added ped modelset fix

This commit is contained in:
PNWParksFan 2019-09-08 22:58:58 -07:00
parent 3030e66aae
commit 31422c4415

View File

@ -1682,7 +1682,16 @@ namespace CodeWalker.World
{
if (PedModelSets == null) return null;
AmbientModelSet ms;
PedModelSets.TryGetValue(hash, out ms);
if(!PedModelSets.TryGetValue(hash, out ms))
{
string s_hash = hash.ToString("X");
ms = new AmbientModelSet();
ms.Name = $"UNKNOWN PED MODELSET ({s_hash})";
ms.NameLower = ms.Name.ToLowerInvariant();
ms.NameHash = new MetaHash(hash);
ms.Models = new AmbientModel[] { };
PedModelSets.Add(hash, ms);
}
return ms;
}
}