From 31422c44159d1129b2cde2a746ee350eaf7a471a Mon Sep 17 00:00:00 2001 From: PNWParksFan Date: Sun, 8 Sep 2019 22:58:58 -0700 Subject: [PATCH] added ped modelset fix --- CodeWalker.Core/World/Scenarios.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CodeWalker.Core/World/Scenarios.cs b/CodeWalker.Core/World/Scenarios.cs index f0e04e9..d598b49 100644 --- a/CodeWalker.Core/World/Scenarios.cs +++ b/CodeWalker.Core/World/Scenarios.cs @@ -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; } }