Ugly workaround for green signals bug

master
orwell96 2019-03-15 17:12:10 +01:00
parent c90411b880
commit 1227456d46
2 changed files with 6 additions and 0 deletions

View File

@ -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)

View File

@ -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