mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2024-11-10 06:41:49 +00:00
Don't allow a Thing's Z position to be scrolled out of bounds in Visual Mode.
This commit is contained in:
parent
e773c543e5
commit
3e7202000e
1 changed files with 4 additions and 1 deletions
|
@ -772,7 +772,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
if((General.Map.UndoRedo.NextUndo == null) || (General.Map.UndoRedo.NextUndo.TicketID != undoticket))
|
||||
undoticket = mode.CreateUndo("Change thing height");
|
||||
|
||||
Thing.Move(Thing.Position + new Vector3D(0.0f, 0.0f, (info.Hangs ? -amount : amount)));
|
||||
Vector3D newPosition = Thing.Position + new Vector3D(0.0f, 0.0f, (info.Hangs ? -amount : amount));
|
||||
newPosition.z = General.Clamp(newPosition.z, General.Map.FormatInterface.MinThingHeight, General.Map.FormatInterface.MaxThingHeight);
|
||||
|
||||
Thing.Move(newPosition);
|
||||
|
||||
mode.SetActionResult("Changed thing height to " + Thing.Position.z + ".");
|
||||
|
||||
|
|
Loading…
Reference in a new issue