Fix unit position retrieval in Rat class to use correct game state
This commit is contained in:
+1
-1
@@ -77,7 +77,7 @@ class Rat(Unit):
|
|||||||
return
|
return
|
||||||
units = []
|
units = []
|
||||||
units.extend(self.game.unit_positions.get(self.position_before, []))
|
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:
|
for unit in units:
|
||||||
if unit.id == self.id or unit.age < AGE_THRESHOLD or self.position != unit.position_before:
|
if unit.id == self.id or unit.age < AGE_THRESHOLD or self.position != unit.position_before:
|
||||||
|
|||||||
Reference in New Issue
Block a user