From a167b95cecd9cbe0c8ac0974c4683dde8504faa2 Mon Sep 17 00:00:00 2001 From: Khopa Date: Sun, 16 Aug 2020 02:25:42 +0200 Subject: [PATCH] Destroyed units will not remain on airfields. --- game/game.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/game/game.py b/game/game.py index 1dbb397d..385261b8 100644 --- a/game/game.py +++ b/game/game.py @@ -378,8 +378,10 @@ class Game: return points - def add_destroyed_units(self, destroyed_unit_data): - self.__destroyed_units.append(destroyed_unit_data) + def add_destroyed_units(self, data): + pos = Point(data["x"], data["z"]) + if self.theater.is_on_land(pos): + self.__destroyed_units.append(data) def get_destroyed_units(self): return self.__destroyed_units