Fixed new train track bug/crash

This commit is contained in:
dexy 2018-12-11 15:33:39 +11:00
parent 1e2e927cf6
commit 775bbe79a8

View File

@ -69,11 +69,14 @@ namespace CodeWalker.World
get
{
int sc = 0;
foreach (var node in Nodes)
if (Nodes != null)
{
if ((node.NodeType == 1) || (node.NodeType == 2) || (node.NodeType == 5))
foreach (var node in Nodes)
{
sc++;
if ((node.NodeType == 1) || (node.NodeType == 2) || (node.NodeType == 5))
{
sc++;
}
}
}
return sc;