From 434923dae6671e187037c4f561966a0858c9f0d5 Mon Sep 17 00:00:00 2001 From: maj00r Date: Wed, 14 Oct 2026 11:41:35 +0200 Subject: [PATCH] fix(track): the part of a guard rail under the running rail of the other track at a wide crossing takes the rail material of the other track, whose wheels alone roll there, instead of the brighter of the two, so a guard of a used track under an unused rail stays rusty, and it ends at the head of that rail without a tinted fade, since the guard itself is never rolled on --- world/RailPlan.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/world/RailPlan.cpp b/world/RailPlan.cpp index 2c17a0c3..f3e9b0eb 100644 --- a/world/RailPlan.cpp +++ b/world/RailPlan.cpp @@ -471,7 +471,9 @@ void TTrack::rail_planner::cross_wide( rail_crossing const &Crossing, rail_size track_rails::guard_rail guard { Crossing.at - reach, Crossing.at + reach }; guard.through = goes_through( m_track, *Crossing.track ); guard.plan.cuts.push_back( corner_cut( Crossing, -flangeway, 1.0, m_size.head, Other.head ) ); - guard.treads.push_back( wide_tread( Crossing, material, m_guardoffset, m_size.head, Other.head ) ); + auto const theirs { Crossing.track->rail_material( Crossing.otherpath ) }; + guard.treads.push_back( wide_tread( Crossing, theirs != null_handle ? theirs : m_track.rail_material( Crossing.path ), m_guardoffset, m_size.head, Other.head ) ); + guard.treads.back().fade = 0.0; merge_guard( m_layout.guards[ Crossing.path ][ Crossing.side > 0 ], guard ); }