Skip to content

Commit bbc2467

Browse files
committed
Change: Improve handling of excessively large StructureIdx values (RV)
1 parent 863719d commit bbc2467

2 files changed

Lines changed: 178 additions & 162 deletions

File tree

source/OpenBVE/Parsers/Route/BVE/CsvRwRouteParser.ApplyRouteData.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,8 @@ private static void ApplyRouteData(string FileName, System.Text.Encoding Encodin
11061106
wpos.Y += dx * RailTransformation.X.Y + dy * RailTransformation.Y.Y + dz * RailTransformation.Z.Y;
11071107
wpos.Z += dx * RailTransformation.X.Z + dy * RailTransformation.Y.Z + dz * RailTransformation.Z.Z;
11081108
double tpos = Data.Blocks[i].RailFreeObj[j][k].TrackPosition;
1109-
Data.Structure.FreeObjects.TryGetValue(sttype, out var obj);
1109+
ObjectManager.UnifiedObject obj = null;
1110+
Data.Structure.FreeObjects.TryGetValue(sttype, out obj);
11101111
obj.CreateObject(wpos, RailTransformation, new World.Transformation(Data.Blocks[i].RailFreeObj[j][k].Yaw, Data.Blocks[i].RailFreeObj[j][k].Pitch, Data.Blocks[i].RailFreeObj[j][k].Roll), -1, Data.AccurateObjectDisposal, StartingDistance, EndingDistance, Data.BlockInterval, tpos, 1.0, false);
11111112
}
11121113
}

0 commit comments

Comments
 (0)