16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 01:19:18 +02:00

cross event detection also without :, bring highlight on map to front

This commit is contained in:
milek7
2020-10-20 17:03:15 +02:00
parent 78305e3b28
commit efb6e3f709
2 changed files with 8 additions and 6 deletions

View File

@@ -59,6 +59,8 @@ bool node_groups::assign_cross_switch(map::track_switch& sw, TTrack* track, std:
sw_name.pop_back();
sw.action[idx] = simulation::Events.FindEvent(sw_name + ":" + id);
if (!sw.action[idx])
sw.action[idx] = simulation::Events.FindEvent(sw_name + id);
if (!sw.action[idx])
return false;
@@ -161,7 +163,7 @@ node_groups::update_map()
char lastc = sw_name.back();
sw_name.pop_back();
if (!simulation::Events.FindEvent(sw_name + ":ac"))
if (!(simulation::Events.FindEvent(sw_name + ":ac") || simulation::Events.FindEvent(sw_name + "ac")))
continue;
if (!last_switch || last_switch->name != sw_name) {