From 845d77ebdac40cb0d18389b66e33f6b84577c190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Vigh?= Date: Tue, 27 Apr 2021 16:46:40 +0200 Subject: [PATCH] area of map is updated in the session at each game preparation to avoid outdated map area and wrong score calculation --- src/Controller/GameController.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Controller/GameController.php b/src/Controller/GameController.php index 23cf3c3..aca55b7 100644 --- a/src/Controller/GameController.php +++ b/src/Controller/GameController.php @@ -93,6 +93,11 @@ class GameController 'currentRound' => -1 ]); } + // update the area of the map in the session in any case + else { + $state['area'] = $map->getArea(); + $session->set('state', $state); + } return new JsonContent([ 'mapId' => $mapId,