🚨 Clamp drawn tile altitudes to the valid range

Drawn statics could exceed the signed altitude range and wrap
around.
This commit is contained in:
2026-11-15 22:08:32 +01:00
parent 1e44b51a06
commit b90fbdf190
+1
View File
@@ -357,6 +357,7 @@ begin
worldItem.Z := FForceZValue;
if FRandomZ then
worldItem.Z := worldItem.Z + Random(FRandomZValue);
worldItem.Z := EnsureRange(worldItem.Z, -128, 127);
end;
end;