Core/vmaps: Removed vmap lookup functions duplicating functionality of each other
Port From (https://github.com/TrinityCore/TrinityCore/commit/45ee989c70682c001d4467d97bf1ecedcf7dbcc3)
This commit is contained in:
@@ -301,7 +301,7 @@ namespace Game.Collision
|
||||
if ((ignoreFlags & ModelIgnoreFlags.M2) != ModelIgnoreFlags.Nothing)
|
||||
{
|
||||
// M2 models are not taken into account for LoS calculation if caller requested their ignoring.
|
||||
if (Flags.HasFlag(ModelFlags.None))
|
||||
if (IsM2())
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -315,26 +315,6 @@ namespace Game.Collision
|
||||
return isc.hit;
|
||||
}
|
||||
|
||||
public bool IntersectPoint(Vector3 p, Vector3 down, out float dist, AreaInfo info)
|
||||
{
|
||||
dist = 0f;
|
||||
if (groupModels.Empty())
|
||||
return false;
|
||||
|
||||
WModelAreaCallback callback = new(groupModels, down);
|
||||
groupTree.IntersectPoint(p, callback);
|
||||
if (callback.hit != null)
|
||||
{
|
||||
info.rootId = (int)RootWMOID;
|
||||
info.groupId = (int)callback.hit.GetWmoID();
|
||||
info.flags = callback.hit.GetMogpFlags();
|
||||
info.result = true;
|
||||
dist = callback.zDist;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool GetLocationInfo(Vector3 p, Vector3 down, out float dist, GroupLocationInfo info)
|
||||
{
|
||||
dist = 0f;
|
||||
|
||||
Reference in New Issue
Block a user