mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
Use 2D distance for visibility checks
This commit is contained in:
parent
a69bc59f1d
commit
df3ca15c3d
9 changed files with 88 additions and 24 deletions
|
|
@ -148,5 +148,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() && IsWithinDistInMap2d(u,World::GetMaxVisibleDistanceForObject()+(inVisibleList ? World::GetVisibleObjectGreyDistance() : 0.0f));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue