From 31d2bf0009114f34a8d46ed613f8cc06bc4650c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Czeka=C5=84ski?= Date: Sun, 26 Apr 2020 16:33:39 +0200 Subject: [PATCH] Fix random A* target selection There was try catch catching all Exceptions, now it's only catching IndexErrors --- src/game/EventManager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/EventManager.py b/src/game/EventManager.py index 1ec7c4d..2c3a84e 100644 --- a/src/game/EventManager.py +++ b/src/game/EventManager.py @@ -97,7 +97,7 @@ class EventManager: try: self.game.movement.gotoToTarget(self.game.map.entities[Random().randint(0, len(self.game.map.entities))]) break - except Exception: + except IndexError: pass