summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--controllerfw.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/controllerfw.lua b/controllerfw.lua
index 885a5a9..0b2e590 100644
--- a/controllerfw.lua
+++ b/controllerfw.lua
@@ -100,6 +100,7 @@ local function gettarget(floor)
local target = 0
if floor == 1 then return 0 end
for i=1,floor-1,1 do
+ if not mem.params.floorheights[i] then return 0 end
target = target+mem.params.floorheights[i]
end
return target