FINALLY FIXED THIS MONSTER MAZE BUG :D
This commit is contained in:
parent
2d173a5be4
commit
c3b2c10934
@ -425,7 +425,7 @@ public class Maze implements Listener
|
||||
if (cur == null)
|
||||
cur = start;
|
||||
|
||||
while (_movementWaypoints.contains(cur.getRelative(face)))
|
||||
while (_movementWaypoints.contains(cur.getRelative(face)) && !_movementWaypointsDisabled.contains(cur.getRelative(face)))
|
||||
{
|
||||
cur = cur.getRelative(face);
|
||||
|
||||
@ -631,13 +631,12 @@ public class Maze implements Listener
|
||||
Location next = pickNextLocForSafePad();
|
||||
|
||||
//Delay
|
||||
_nextSafePad = new SafePad(_host, this, next.subtract(0, 1, 0)); // maybe don't need to clone()
|
||||
_nextSafePad = new SafePad(_host, this, next.clone().subtract(0, 1, 0)); // maybe don't need to clone()
|
||||
_nextSafePad.build();
|
||||
|
||||
for (Block cur : UtilBlock.getInBoundingBox(next.clone().add(-2, 0, -2), next.clone().add(2, 0, 2)))
|
||||
for (Block cur : UtilBlock.getInBoundingBox(next.clone().add(-2, 0, -2), next.clone().add(2, 0, 2), false))
|
||||
{
|
||||
//TODO Maze stuff
|
||||
|
||||
if (!_movementWaypointsDisabled.contains(cur))
|
||||
_movementWaypointsDisabled.add(cur);
|
||||
}
|
||||
@ -843,10 +842,10 @@ public class Maze implements Listener
|
||||
SafePad pad = iterator.next();
|
||||
|
||||
if (!pad.decay())
|
||||
return;
|
||||
continue;
|
||||
|
||||
for (Block block : UtilBlock.getInBoundingBox(pad.getLocation().clone().add(-2, 0, -2), pad.getLocation().clone().add(2, 0, 2)))
|
||||
{
|
||||
for (Block block : UtilBlock.getInBoundingBox(pad.getLocation().clone().add(-2, 1, -2), pad.getLocation().clone().add(2, 1, 2), false))
|
||||
{
|
||||
if (_movementWaypointsDisabled.contains(block))
|
||||
_movementWaypointsDisabled.remove(block);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user