fixed walk-in door bug
This commit is contained in:
parent
25aa2271a1
commit
c8f8d7dde3
@ -33,12 +33,13 @@ public class EventMoveToCell extends Cell {
|
|||||||
public int getDirectionOut() { return directionOut; }
|
public int getDirectionOut() { return directionOut; }
|
||||||
|
|
||||||
public void moveToMap() {
|
public void moveToMap() {
|
||||||
|
WindowOfFreeMove.getMap().getPerson().stopPerson();
|
||||||
WindowOfFreeMove.getMap().setIdExit(id);
|
WindowOfFreeMove.getMap().setIdExit(id);
|
||||||
WindowOfFreeMove.setMap(this.map);
|
WindowOfFreeMove.setMap(this.map);
|
||||||
WindowOfFreeMove.getMap().setIdExit(id);
|
WindowOfFreeMove.getMap().setIdExit(id);
|
||||||
WindowOfFreeMove.getMap().getPerson().stopPerson();
|
|
||||||
WindowOfFreeMove.paintMapOnWindow();
|
WindowOfFreeMove.paintMapOnWindow();
|
||||||
WindowOfFreeMove.repaintCanvas();
|
WindowOfFreeMove.repaintCanvas();
|
||||||
|
WindowOfFreeMove.setCanPersonMove(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -80,6 +80,7 @@ public class Person extends Cell {
|
|||||||
}
|
}
|
||||||
if (WindowOfFreeMove.getMap().isCellMoveTo(x, y)) {
|
if (WindowOfFreeMove.getMap().isCellMoveTo(x, y)) {
|
||||||
set(x, y);
|
set(x, y);
|
||||||
|
WindowOfFreeMove.setCanPersonMove(false);
|
||||||
if (!isMoving) {
|
if (!isMoving) {
|
||||||
WindowOfFreeMove.getMap().findEventByXY(x, y).moveToMap();
|
WindowOfFreeMove.getMap().findEventByXY(x, y).moveToMap();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user