fix(Core/Visibility): Visibility should be using 2d distance checks (#22839)
This commit is contained in:
@@ -1801,7 +1801,7 @@ bool WorldObject::CanSeeOrDetect(WorldObject const* obj, bool ignoreStealth, boo
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Xinef: check reversely obj vs viewpoint, object could be a gameObject which overrides _IsWithinDist function to include gameobject size
|
// Xinef: check reversely obj vs viewpoint, object could be a gameObject which overrides _IsWithinDist function to include gameobject size
|
||||||
if (!corpseCheck && !viewpoint->IsWithinDist(obj, GetSightRange(obj), true))
|
if (!corpseCheck && !viewpoint->IsWithinDist(obj, GetSightRange(obj), false))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16327,7 +16327,7 @@ bool Player::IsWorldObjectOutOfSightRange(WorldObject const* target) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if out of range
|
// Check if out of range
|
||||||
return !m_seer->IsWithinDist(target, GetSightRange(target), true);
|
return !m_seer->IsWithinDist(target, GetSightRange(target), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Player::GetPlayerName()
|
std::string Player::GetPlayerName()
|
||||||
|
|||||||
Reference in New Issue
Block a user