From 7dc4d13f599cb15d74f08f7ddd61a3a9ed996006 Mon Sep 17 00:00:00 2001
From: cheapie <no-email-for-you@example.com>
Date: Tue, 6 Aug 2024 12:49:27 -0500
Subject: Require floor heights to be at least 1m Floor heights of 0 lead to
 ambiguous car positions and strange behavior

---
 controllerfw.lua | 2 +-
 dispatcherfw.lua | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/controllerfw.lua b/controllerfw.lua
index 3392179..a0de7cd 100644
--- a/controllerfw.lua
+++ b/controllerfw.lua
@@ -358,7 +358,7 @@ elseif event.type == "ui" then
 			local height = tonumber(event.fields.height)
 			if height then
 				height = math.floor(height+0.5)
-				mem.params.floorheights[mem.editingfloor] = math.max(0,height)
+				mem.params.floorheights[mem.editingfloor] = math.max(1,height)
 			end
 			mem.params.floornames[mem.editingfloor] = string.sub(event.fields.name,1,256)
 		end
diff --git a/dispatcherfw.lua b/dispatcherfw.lua
index 428312c..82a4a35 100644
--- a/dispatcherfw.lua
+++ b/dispatcherfw.lua
@@ -394,7 +394,7 @@ elseif event.type == "ui" then
 			local height = tonumber(event.fields.height)
 			if height then
 				height = math.floor(height+0.5)
-				mem.params.floorheights[mem.editingfloor] = math.max(0,height)
+				mem.params.floorheights[mem.editingfloor] = math.max(1,height)
 			end
 			mem.params.floornames[mem.editingfloor] = string.sub(event.fields.name,1,256)
 		end
-- 
cgit v1.2.3