Skip to content

Commit

Permalink
Fix: Beacon issue with some BVE5 content
Browse files Browse the repository at this point in the history
  • Loading branch information
leezer3 committed Oct 6, 2024
1 parent 65e99c8 commit 7d2fad7
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions source/Plugins/Route.Bve5/MapParser/ConfirmComponents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -809,10 +809,7 @@ private static void ConfirmBeacon(bool PreviewOnly, MapData ParseData, RouteData

dynamic d = Statement;

object Type = d.Type;
object TempSection = d.Section;
object SendData = d.Senddata;

int TempSection = Convert.ToInt32(d.Section);
int BlockIndex = RouteData.sortedBlocks.FindBlockIndex(Statement.Distance);

int Section = Convert.ToInt32(TempSection);
Expand All @@ -831,7 +828,7 @@ private static void ConfirmBeacon(bool PreviewOnly, MapData ParseData, RouteData
Section += CurrentSection;
}

RouteData.Blocks[BlockIndex].Transponders.Add(new Transponder(Statement.Distance, (int)Type, (int)SendData, Section));
RouteData.Blocks[BlockIndex].Transponders.Add(new Transponder(Statement.Distance, Convert.ToInt32(d.Type), Convert.ToInt32(d.Senddata), Section));
}
}

Expand Down

0 comments on commit 7d2fad7

Please sign in to comment.