From b9f7e9f3c3c8b0fb9b0b1f6cc21de9d4bd4337d7 Mon Sep 17 00:00:00 2001 From: musilto9 Date: Tue, 24 Mar 2020 12:40:51 +0100 Subject: [PATCH] fixxed trigger-event start --- src/main/java/ruscz/game/gameOfProd/Cells/Person.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/ruscz/game/gameOfProd/Cells/Person.java b/src/main/java/ruscz/game/gameOfProd/Cells/Person.java index ee2073c..e32a2e9 100644 --- a/src/main/java/ruscz/game/gameOfProd/Cells/Person.java +++ b/src/main/java/ruscz/game/gameOfProd/Cells/Person.java @@ -123,9 +123,13 @@ public class Person extends Cell { directionMove = 0; if (map.isActiveTriggerCell(x,y) && !isInEvent) { - isInEvent = true; - WindowOfFreeMove.setNextMove(WindowOfFreeMove.KEY_EVENT); - map.findTriggerByXY(x,y).startEvent(); + set(x, y); + WindowOfFreeMove.setCanPersonMove(false); + if (!isMoving) { + isInEvent = true; + WindowOfFreeMove.setNextMove(WindowOfFreeMove.KEY_EVENT); + map.findTriggerByXY(x,y).startEvent(); + } } } }