17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-25 02:07:37 +02:00

fix(ai): orders of road junctions and level crossings measured along the lane they lie on, so they aren't misplaced on short lanes

This commit is contained in:
2026-10-22 17:16:33 +02:00
parent 29f624024f
commit f4f8c75e49
2 changed files with 10 additions and 1 deletions

View File

@@ -947,6 +947,8 @@ void roadpoint_node::update_crossing(double const Deltatime)
auto const closed{control > 0.0 || (control == 0.0 && m_hold > 0.0)};
if (closed != m_closed)
{
WriteLog("Level crossing \"" + m_name + "\" " + (closed ? "closed" : "opened") + (control != 0.0 ? " by memory cell \"" + m_memcell->name() + "\"" : " by the trains") + ", stops: " +
std::to_string(m_stops.size()));
close(closed);
}
}