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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user