Fix random A* target selection
There was try catch catching all Exceptions, now it's only catching IndexErrors
This commit is contained in:
parent
dee9ebb77c
commit
31d2bf0009
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user