Skip to content

Commit 7cc935e

Browse files
committed
Fix: g_minZ = minZ -> g_minZ = minZ or 0 to fix vehicle element creation
1 parent cfb2e30 commit 7cc935e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

[editor]/editor_gui/client/elementproperties.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ local function addPropertyControl( controlType, controlLabelName, controlDescrip
448448
if selectedElement then
449449
if newControl:getLabel() == "model" and (elementType == "object" or elementType == "vehicle") then
450450
local minX, minY, minZ = getElementBoundingBox(selectedElement)
451-
g_minZ = minZ
451+
g_minZ = minZ or 0
452452
local handlerFunction = function ()
453453
local minX2, minY2, minZ2 = getElementBoundingBox(selectedElement)
454454
if minX2 and minY2 and minZ2 then

0 commit comments

Comments
 (0)