Selected scenario vehicle nodes display car model

This commit is contained in:
dexyfex
2017-10-02 01:06:12 +11:00
Unverified
parent 81e24ef86f
commit eab1526df5
5 changed files with 74 additions and 27 deletions
+15
View File
@@ -576,6 +576,7 @@ namespace CodeWalker.World
NodeDict[cnode.Position] = exnode;
Nodes.Add(exnode);
}
cnode.ScenarioNode = exnode;
return exnode;
}
private ScenarioNode EnsureNode(MCScenarioPoint point)
@@ -745,6 +746,7 @@ namespace CodeWalker.World
if (copy.ChainingNode != null)
{
n.ChainingNode = new MCScenarioChainingNode(rgn, copy.ChainingNode);
n.ChainingNode.ScenarioNode = n;
}
}
else
@@ -1755,6 +1757,9 @@ namespace CodeWalker.World
public string NameLower { get; set; }
public MetaHash NameHash { get; set; }
public bool IsVehicle { get; set; }
public string VehicleModelSet { get; set; }
public MetaHash VehicleModelSetHash { get; set; }
public virtual void Load(XmlNode node)
{
@@ -1762,6 +1767,16 @@ namespace CodeWalker.World
Name = Xml.GetChildInnerText(node, "Name");
NameLower = Name.ToLowerInvariant();
NameHash = JenkHash.GenHash(NameLower);
if (IsVehicle)
{
VehicleModelSet = Xml.GetChildStringAttribute(node, "VehicleModelSet", "ref");
if (!string.IsNullOrEmpty(VehicleModelSet) && (VehicleModelSet != "NULL"))
{
VehicleModelSetHash = JenkHash.GenHash(VehicleModelSet.ToLowerInvariant());
}
}
}
public override string ToString()
+1 -1
View File
@@ -263,7 +263,7 @@ namespace CodeWalker.World
MapDataStoreNode dsn = new MapDataStoreNode(ymap);
if (dsn.Name != 0)
{
nodedict[dsn.Name] = dsn;
nodedict[dsn.Name] = dsn;//perhaps should add as entry.ShortNameHash?
}
else
{ }