Fix concurrent access to entity list issue
This commit is contained in:
parent
90b046f3e7
commit
80ae824ed8
|
@ -94,7 +94,7 @@ class Bomb(Item):
|
||||||
Special exploding action of the bomb
|
Special exploding action of the bomb
|
||||||
"""
|
"""
|
||||||
if self.exploding:
|
if self.exploding:
|
||||||
for e in m.entities:
|
for e in m.entities.copy():
|
||||||
if abs(e.x - self.x) + abs(e.y - self.y) <= 1 and \
|
if abs(e.x - self.x) + abs(e.y - self.y) <= 1 and \
|
||||||
isinstance(e, FightingEntity):
|
isinstance(e, FightingEntity):
|
||||||
e.take_damage(self, self.damage)
|
e.take_damage(self, self.damage)
|
||||||
|
|
Loading…
Reference in New Issue