From 77c32763509853e9b616bea162aaa904e27e304f Mon Sep 17 00:00:00 2001 From: cheapie Date: Sat, 20 Apr 2024 11:17:46 -0500 Subject: Fix crash in down call reassignment --- dispatcherfw.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'dispatcherfw.lua') diff --git a/dispatcherfw.lua b/dispatcherfw.lua index 1314eb7..528adc7 100644 --- a/dispatcherfw.lua +++ b/dispatcherfw.lua @@ -559,7 +559,7 @@ elseif event.type == "abm" or event.iid == "run" then end end for i in pairs(mem.assignedup) do - if mem.upcalls[i] then + if mem.upcalls[i] and mem.upeta[i] then local eligiblecars = {} local permanent = false for _,carid in pairs(mem.params.carids) do @@ -623,7 +623,7 @@ elseif event.type == "abm" or event.iid == "run" then bestcar = carid end end - mem.upeta[i] = besteta + mem.dneta[i] = besteta if bestcar then send(bestcar,"groupdncall",realtocarfloor(bestcar,i)) mem.assigneddn[i] = bestcar @@ -633,7 +633,7 @@ elseif event.type == "abm" or event.iid == "run" then end end for i in pairs(mem.assigneddn) do - if mem.dncalls[i] then + if mem.dncalls[i] and mem.dneta[i] then local eligiblecars = {} for _,carid in pairs(mem.params.carids) do if mem.carstatus[carid].state == "normal" and mem.params.floorsserved[carid][i] then -- cgit v1.2.3