Ugly workaround for green signals bug
This commit is contained in:
parent
c90411b880
commit
1227456d46
|
@ -459,6 +459,9 @@ function advtrains.save(remove_players_from_wagons)
|
||||||
atlatc.save()
|
atlatc.save()
|
||||||
end
|
end
|
||||||
atprint("[save_all]Saved advtrains save files")
|
atprint("[save_all]Saved advtrains save files")
|
||||||
|
|
||||||
|
--TODO very simple yet hacky workaround for the "green signals" bug
|
||||||
|
advtrains.invalidate_all_paths()
|
||||||
end
|
end
|
||||||
minetest.register_on_shutdown(advtrains.save)
|
minetest.register_on_shutdown(advtrains.save)
|
||||||
|
|
||||||
|
|
|
@ -124,5 +124,8 @@ function advtrains.interlocking.ars_check(sigd, train)
|
||||||
--delay routesetting, it should not occur inside train step
|
--delay routesetting, it should not occur inside train step
|
||||||
-- using after here is OK because that gets called on every path recalculation
|
-- using after here is OK because that gets called on every path recalculation
|
||||||
minetest.after(0, il.route.update_route, sigd, tcbs, rteid, nil)
|
minetest.after(0, il.route.update_route, sigd, tcbs, rteid, nil)
|
||||||
|
else
|
||||||
|
-- just "punch" routesetting, just in case callback got lost.
|
||||||
|
minetest.after(0, il.route.update_route, sigd, tcbs, nil, nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue