Skip to content

Commit

Permalink
Roadmap: Update spline lengths during xml -> roadmap
Browse files Browse the repository at this point in the history
  • Loading branch information
Greavesy1899 committed Mar 20, 2024
1 parent 23f5174 commit 25d99ae
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Mafia2Libs/Core/IO/FileRoadMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ public override void Save()
if (openFile.ShowDialog() == true)
{
IRoadmap NewRoadmap = ConvertFromXml(GetNewRoadmapFactory(), openFile.FileName);

// Update spline lengths (todo add this on roadmap probs)
foreach(IRoadSpline Spline in NewRoadmap.Splines)
{
Spline.CalculateLength();
}

// now save
using (FileStream FStream = File.Open(file.FullName, FileMode.Open))
{
NewRoadmap.Write(FStream);
Expand Down

0 comments on commit 25d99ae

Please sign in to comment.