diff options
Diffstat (limited to 'src/game/Object.cpp')
-rw-r--r-- | src/game/Object.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/game/Object.cpp b/src/game/Object.cpp index 1b8a21650bd..4e0f7c01964 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -611,7 +611,7 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask if(!target->isAllowedToLoot((Creature*)this)) *data << (m_uint32Values[ index ] & ~UNIT_DYNFLAG_LOOTABLE); else - *data << (m_uint32Values[ index ] & ~UNIT_DYNFLAG_OTHER_TAGGER); + *data << (m_uint32Values[ index ] & ~UNIT_DYNFLAG_TAPPED); } else *data << m_uint32Values[ index ]; @@ -1103,8 +1103,8 @@ bool Object::PrintIndexError(uint32 index, bool set) const bool Position::HasInLine(const Unit * const target, float distance, float width) const { - assert(target); - if(!HasInArc(M_PI, target) || !target->IsWithinDist3d(m_positionX, m_positionY, m_positionZ, distance)) return false; + if (!HasInArc(M_PI, target) || !target->IsWithinDist3d(m_positionX, m_positionY, m_positionZ, distance)) + return false; width += target->GetObjectSize(); float angle = GetRelativeAngle(target); return abs(sin(angle)) * GetExactDist2d(target->GetPositionX(), target->GetPositionY()) < width; @@ -1193,7 +1193,6 @@ InstanceData* WorldObject::GetInstanceData() float WorldObject::GetDistanceZ(const WorldObject* obj) const { - assert(obj); float dz = fabs(GetPositionZ() - obj->GetPositionZ()); float sizefactor = GetObjectSize() + obj->GetObjectSize(); float dist = dz - sizefactor; @@ -1202,7 +1201,6 @@ float WorldObject::GetDistanceZ(const WorldObject* obj) const bool WorldObject::_IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D) const { - assert(obj); float dx = GetPositionX() - obj->GetPositionX(); float dy = GetPositionY() - obj->GetPositionY(); float distsq = dx*dx + dy*dy; @@ -1360,7 +1358,6 @@ void Position::GetSinCos(const float x, const float y, float &vsin, float &vcos) bool Position::HasInArc(float arc, const Position *obj) const { - assert(obj); // always have self in arc if(obj == this) return true; |