mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-22 23:12:59 +08:00
Merge pull request #55 from pnwparksfan/ImportUnknownModelsetScenarios
Import scenarios with unknown modelsets
This commit is contained in:
commit
bf150eb0a7
@ -1682,7 +1682,16 @@ namespace CodeWalker.World
|
|||||||
{
|
{
|
||||||
if (PedModelSets == null) return null;
|
if (PedModelSets == null) return null;
|
||||||
AmbientModelSet ms;
|
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;
|
return ms;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1692,7 +1701,16 @@ namespace CodeWalker.World
|
|||||||
{
|
{
|
||||||
if (VehicleModelSets == null) return null;
|
if (VehicleModelSets == null) return null;
|
||||||
AmbientModelSet ms;
|
AmbientModelSet ms;
|
||||||
VehicleModelSets.TryGetValue(hash, out ms);
|
if(!VehicleModelSets.TryGetValue(hash, out ms))
|
||||||
|
{
|
||||||
|
string s_hash = hash.ToString("X");
|
||||||
|
ms = new AmbientModelSet();
|
||||||
|
ms.Name = $"UNKNOWN VEHICLE MODELSET ({s_hash})";
|
||||||
|
ms.NameLower = ms.Name.ToLowerInvariant();
|
||||||
|
ms.NameHash = new MetaHash(hash);
|
||||||
|
ms.Models = new AmbientModel[] {};
|
||||||
|
VehicleModelSets.Add(hash, ms);
|
||||||
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user