summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2024-05-14 21:29:53 -0500
committercheapie <no-email-for-you@example.com>2024-05-14 21:29:53 -0500
commit77fda7e5b96b492a8ae0f5a3181a1446182df1a2 (patch)
treeba6a49f66792f50229d1d66351d3a696cdd0273d
parentc3b125132d32ee6db61799f0216bc43a107d8803 (diff)
downloadcelevator-77fda7e5b96b492a8ae0f5a3181a1446182df1a2.tar
celevator-77fda7e5b96b492a8ae0f5a3181a1446182df1a2.tar.gz
celevator-77fda7e5b96b492a8ae0f5a3181a1446182df1a2.tar.bz2
celevator-77fda7e5b96b492a8ae0f5a3181a1446182df1a2.tar.xz
celevator-77fda7e5b96b492a8ae0f5a3181a1446182df1a2.zip
Fix cars trying to answer hall calls in both directions at the same time
-rw-r--r--controllerfw.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/controllerfw.lua b/controllerfw.lua
index f4c5b07..09f62f1 100644
--- a/controllerfw.lua
+++ b/controllerfw.lua
@@ -1020,7 +1020,7 @@ if mem.carmotion then
mem.groupupcalls[getpos()] = nil
if (not hallcall) and (not getnextcallabove()) and getnextcallbelow() then
mem.direction = "down"
- elseif mem.dncalls[getpos()] and (not mem.upcalls[getpos()]) and (not getnextcallabove(nil,true)) then
+ elseif (not hallcall) and mem.dncalls[getpos()] and (not mem.upcalls[getpos()]) and (not getnextcallabove(nil,true)) then
mem.direction = "down"
mem.dncalls[getpos()] = nil
mem.swingdncalls[getpos()] = nil
@@ -1032,7 +1032,7 @@ if mem.carmotion then
mem.groupdncalls[getpos()] = nil
if (not hallcall) and (not getnextcallbelow()) and getnextcallabove() then
mem.direction = "up"
- elseif mem.upcalls[getpos()] and (not mem.dncalls[getpos()]) and (not getnextcallbelow(nil,true)) then
+ elseif (not hallcall) and mem.upcalls[getpos()] and (not mem.dncalls[getpos()]) and (not getnextcallbelow(nil,true)) then
mem.direction = "up"
mem.upcalls[getpos()] = nil
mem.swingupcalls[getpos()] = nil