Fix Place/BreakLine breaking with length 0

main
copygirl 4 years ago
parent 120e6f63c5
commit b14d43b838
  1. 4
      src/Items/CreativeBuilding.cs

@ -115,7 +115,7 @@ public class CreativeBuilding : Node2D
// TODO: Make sure position is a reasonable distance away.
if (!Enum.IsDefined(typeof(Facing), direction)) return;
if ((length < 1) || (length > MaxLength)) return;
if ((length < 0) || (length > MaxLength)) return;
// TODO: Test if starting block is valid.
// FIXME: Test if there is a player in the way.
@ -136,7 +136,7 @@ public class CreativeBuilding : Node2D
// TODO: Make sure position is a reasonable distance away.
if (!Enum.IsDefined(typeof(Facing), direction)) return;
if ((length < 1) || (length > MaxLength)) return;
if ((length < 0) || (length > MaxLength)) return;
var start = new BlockPos(x, y);
var world = this.GetWorld();

Loading…
Cancel
Save