Require floor heights to be at least 1m

Floor heights of 0 lead to ambiguous car positions and strange behavior
This commit is contained in:
cheapie 2024-08-06 12:49:27 -05:00
parent fe4c23ecd0
commit 7dc4d13f59
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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