BFA Update (still lots of testing to do tho)

This commit is contained in:
hondacrx
2018-12-10 12:46:25 -05:00
parent 468b053946
commit 8e20114e10
256 changed files with 35613 additions and 10459 deletions
+10 -1
View File
@@ -312,8 +312,16 @@ namespace Game.Collision
RootWMOID = 0;
}
public override bool IntersectRay(Ray ray, ref float distance, bool stopAtFirstHit)
public override bool IntersectRay(Ray ray, ref float distance, bool stopAtFirstHit, ModelIgnoreFlags ignoreFlags)
{
// If the caller asked us to ignore certain objects we should check flags
if ((ignoreFlags & ModelIgnoreFlags.M2) != ModelIgnoreFlags.Nothing)
{
// M2 models are not taken into account for LoS calculation if caller requested their ignoring.
if ((Flags & (uint)ModelFlags.M2) != 0)
return false;
}
// small M2 workaround, maybe better make separate class with virtual intersection funcs
// in any case, there's no need to use a bound tree if we only have one submodel
if (groupModels.Count == 1)
@@ -404,5 +412,6 @@ namespace Game.Collision
List<GroupModel> groupModels = new List<GroupModel>();
BIH groupTree = new BIH();
uint RootWMOID;
public uint Flags;
}
}