feat(Core/LOS): restruct LOS functions and add LineOfSight check (#1459)

This commit is contained in:
Viste(Кирилл)
2019-02-14 00:24:04 +03:00
committed by Francesco Borzì
parent 6908d333db
commit cb81f3c17a
12 changed files with 84 additions and 56 deletions

View File

@@ -865,8 +865,8 @@ class WorldObject : public Object, public WorldLocation
{
return obj && IsInMap(obj) && InSamePhase(obj) && _IsWithinDist(obj, dist2compare, is3D);
}
bool IsWithinLOS(float x, float y, float z) const;
bool IsWithinLOSInMap(const WorldObject* obj) const;
bool IsWithinLOS(float x, float y, float z, LineOfSightChecks checks = LINEOFSIGHT_ALL_CHECKS) const;
bool IsWithinLOSInMap(WorldObject const* obj, LineOfSightChecks checks = LINEOFSIGHT_ALL_CHECKS) const;
Position GetHitSpherePointFor(Position const& dest) const;
void GetHitSpherePointFor(Position const& dest, float& x, float& y, float& z) const;
bool GetDistanceOrder(WorldObject const* obj1, WorldObject const* obj2, bool is3D = true) const;