From 194a3bed98bb46ae64cdb69f2f2b3ec4de78ec13 Mon Sep 17 00:00:00 2001 From: cheapie Date: Wed, 9 Apr 2025 17:27:49 -0500 Subject: Fix misbehavior and possible crashes if the floor table is edited such that the floor the car is on no longer exists --- controllerfw.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllerfw.lua b/controllerfw.lua index 430d576..2b29db2 100644 --- a/controllerfw.lua +++ b/controllerfw.lua @@ -97,7 +97,7 @@ local function getpos(pioffset) ret = ret+v if ret > searchpos then return k end end - return mem.params.floorheights[#mem.params.floorheights] + return #mem.params.floorheights end local function gettarget(floor) -- cgit v1.2.3