diff options
author | Y. Wang <yw05@forksworld.de> | 2022-08-13 16:16:17 +0200 |
---|---|---|
committer | Y. Wang <yw05@forksworld.de> | 2023-03-23 20:06:02 +0100 |
commit | a4abbf8824f893558861bff2893181ae02ed284d (patch) | |
tree | 2aca28114679f5d52c52b868855505c1a56b500e /advtrains_interlocking/signal_api.lua | |
parent | 6ae0615309bd5862a7480686ccba01a24b69356b (diff) | |
download | advtrains-a4abbf8824f893558861bff2893181ae02ed284d.tar.gz advtrains-a4abbf8824f893558861bff2893181ae02ed284d.tar.bz2 advtrains-a4abbf8824f893558861bff2893181ae02ed284d.zip |
Add hotfix for path invalidation
Diffstat (limited to 'advtrains_interlocking/signal_api.lua')
-rw-r--r-- | advtrains_interlocking/signal_api.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/advtrains_interlocking/signal_api.lua b/advtrains_interlocking/signal_api.lua index 1c6ed27..e615692 100644 --- a/advtrains_interlocking/signal_api.lua +++ b/advtrains_interlocking/signal_api.lua @@ -227,8 +227,10 @@ function advtrains.interlocking.signal_on_aspect_changed(pos) local ipts, iconn = advtrains.interlocking.db.get_ip_by_signalpos(pos) if not ipts then return end local ipos = minetest.string_to_pos(ipts) - - advtrains.invalidate_all_paths_ahead(ipos) + + -- FIXME: invalidate_all_paths_ahead does not appear to always work as expected + --advtrains.invalidate_all_paths_ahead(ipos) + minetest.after(0, advtrains.invalidate_all_paths, ipos) end function advtrains.interlocking.signal_rc_handler(pos, node, player, itemstack, pointed_thing) |