mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 04:44:08 +02:00
Removing build warning about out-of-order initialization in class ctor.
This commit is contained in:
parent
b2d60ec1f8
commit
570b872eda
2 changed files with 7 additions and 2 deletions
|
@ -73,8 +73,8 @@ Avatar::Avatar() :
|
|||
_mouseRayOrigin(0.0f, 0.0f, 0.0f),
|
||||
_mouseRayDirection(0.0f, 0.0f, 0.0f),
|
||||
_moving(false),
|
||||
_collisionFlags(0),
|
||||
_owningAvatarMixer(),
|
||||
_collisionFlags(0),
|
||||
_initialized(false)
|
||||
{
|
||||
// we may have been created in the network thread, but we live in the main thread
|
||||
|
|
|
@ -757,8 +757,13 @@ void MyAvatar::updateAvatarCollisions(float deltaTime) {
|
|||
// Reset detector for nearest avatar
|
||||
_distanceToNearestAvatar = std::numeric_limits<float>::max();
|
||||
float myRadius = (0.5f + COLLISION_RADIUS_SCALE) * getHeight();
|
||||
foreach (const AvatarSharedPointer& avatarPointer, Application::getInstance()->getAvatarManager().getAvatarHash()) {
|
||||
const AvatarHash& avatars = Application::getInstance()->getAvatarManager().getAvatarHash();
|
||||
foreach (const AvatarSharedPointer& avatarPointer, avatars) {
|
||||
Avatar* avatar = static_cast<Avatar*>(avatarPointer.data());
|
||||
if (static_cast<Avatar*>(this) == avatar) {
|
||||
// don't collide with ourselves
|
||||
continue;
|
||||
}
|
||||
float distance = glm::length(_position - avatar->_position);
|
||||
if (_distanceToNearestAvatar > distance) {
|
||||
_distanceToNearestAvatar = distance;
|
||||
|
|
Loading…
Reference in a new issue