Browse Source

Fix unit position retrieval in Rat class to use correct game state

master
Matteo Benedetto 4 months ago
parent
commit
265af1832d
  1. 2
      units/rat.py

2
units/rat.py

@ -77,7 +77,7 @@ class Rat(Unit):
return
units = []
units.extend(self.game.unit_positions.get(self.position_before, []))
units.extend(self.game.unit_positions_before.get(self.position, []))
units.extend(self.game.unit_positions.get(self.position, []))
for unit in units:
if unit.id == self.id or unit.age < AGE_THRESHOLD or self.position != unit.position_before:

Loading…
Cancel
Save