Core/Vmaps: Fixed use after free and deadlocks when loading a model file fails
Port From (https://github.com/TrinityCore/TrinityCore/commit/d05dbaaecbd4bf7e1c0fd32d0fef34341b4067f6)
This commit is contained in:
@@ -331,7 +331,6 @@ namespace Game.Collision
|
||||
uint RootWMOID;
|
||||
List<GroupModel> groupModels = new();
|
||||
BIH groupTree = new();
|
||||
string name; // valid only while model is held in VMapManager2::iLoadedModelFiles
|
||||
|
||||
public override bool IntersectRay(Ray ray, ref float distance, bool stopAtFirstHit, ModelIgnoreFlags ignoreFlags)
|
||||
{
|
||||
@@ -423,9 +422,6 @@ namespace Game.Collision
|
||||
return groupTree.ReadFromFile(reader);
|
||||
}
|
||||
|
||||
public string GetName() { return name; }
|
||||
public void SetName(string newName) { name = newName; }
|
||||
|
||||
public bool IsM2() { return Flags.HasFlag(ModelFlags.IsM2); }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user