diff options
Diffstat (limited to 'src/game/DynamicObject.cpp')
-rw-r--r-- | src/game/DynamicObject.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game/DynamicObject.cpp b/src/game/DynamicObject.cpp index c1f5212ca05..854d2e82e3e 100644 --- a/src/game/DynamicObject.cpp +++ b/src/game/DynamicObject.cpp @@ -136,6 +136,9 @@ void DynamicObject::Update(uint32 p_time) void DynamicObject::Delete() { + // Make sure the object is back to grid container for removal as farsight targets + // are switched to world container on creation + GetMap()->SwitchGridContainers(this, false); SendObjectDeSpawnAnim(GetGUID()); AddObjectToRemoveList(); } @@ -150,5 +153,5 @@ void DynamicObject::Delay(int32 delaytime) bool DynamicObject::isVisibleForInState(Player const* u, bool inVisibleList) const { - return IsInWorld() && u->IsInWorld() && IsWithinDistInMap(u,World::GetMaxVisibleDistanceForObject()+(inVisibleList ? World::GetVisibleObjectGreyDistance() : 0.0f)); + return IsInWorld() && u->IsInWorld() /*&& IsWithinDistInMap(u,World::GetMaxVisibleDistanceForObject()+(inVisibleList ? World::GetVisibleObjectGreyDistance() : 0.0f))*/; } |