From 772c3174be649ea2e5e977926d5562acdbbf6005 Mon Sep 17 00:00:00 2001 From: Gregoire Parant Date: Thu, 18 Feb 2021 11:32:37 +0100 Subject: [PATCH] Fix last properties changed after trigger change position --- front/src/Phaser/Game/GameMap.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/front/src/Phaser/Game/GameMap.ts b/front/src/Phaser/Game/GameMap.ts index 12da0514..110a29d6 100644 --- a/front/src/Phaser/Game/GameMap.ts +++ b/front/src/Phaser/Game/GameMap.ts @@ -29,6 +29,7 @@ export class GameMap { const newProps = this.getProperties(key); const oldProps = this.lastProperties; + this.lastProperties = newProps; // Let's compare the 2 maps: // First new properties vs oldProperties @@ -45,8 +46,6 @@ export class GameMap { this.trigger(oldPropName, oldPropValue, undefined, newProps); } } - - this.lastProperties = newProps; } public getCurrentProperties(): Map {