🚨 Apply random elevation offsets in raise and lower modes
The random offset was computed first and then overwritten by the raise and lower branches.
This commit is contained in:
+2
-3
@@ -418,13 +418,12 @@ begin
|
|||||||
Continue;
|
Continue;
|
||||||
|
|
||||||
newZ := FZ;
|
newZ := FZ;
|
||||||
if FRandomZ then
|
|
||||||
newZ := newZ + Random(FRandomZValue);
|
|
||||||
|
|
||||||
case FMode of
|
case FMode of
|
||||||
emRaise: newZ := item.Z + FZ;
|
emRaise: newZ := item.Z + FZ;
|
||||||
emLower: newZ := item.Z - FZ;
|
emLower: newZ := item.Z - FZ;
|
||||||
end;
|
end;
|
||||||
|
if FRandomZ then
|
||||||
|
newZ := newZ + Random(FRandomZValue);
|
||||||
|
|
||||||
newZ := EnsureRange(newZ, -128, 127);
|
newZ := EnsureRange(newZ, -128, 127);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user