diff --git a/traque-back/game.js b/traque-back/game.js index 9e9d6f3..f7ac5d7 100644 --- a/traque-back/game.js +++ b/traque-back/game.js @@ -167,6 +167,9 @@ export default class Game { if (team == undefined) { return false; } + if(location == null) { + return false; + } team.currentLocation = location; //Update the team ready status if they are in their starting area if (this.state == GameState.PLACEMENT && team.startingArea && team.startingArea && location) { @@ -190,6 +193,10 @@ export default class Game { if (team == undefined) { return false; } + if(team.currentLocation == null) { + return false; + } + team.locationSendDeadline = Number(new Date()) + penaltyController.settings.allowedTimeBetweenPositionUpdate * 60 * 1000; team.lastSentLocation = team.currentLocation; if (this.getTeam(team.chasing) != null) {