1
0

fix merge regression and exlude death player from attackable players

This commit is contained in:
andrea
2025-08-02 09:33:06 +02:00
parent 62c7c7f2c2
commit 3cc6966d86
2 changed files with 11 additions and 8 deletions

View File

@@ -126,12 +126,12 @@ class BrSimMap():
x= coord_x + shift
if x < 0 or x >= self.world_width -1: continue
resource= self.get_map_matrix()[coord_y][x]
if resource and resource.is_player(): attackable_players.append(resource)
if resource and resource.is_player() and resource.is_alive(): attackable_players.append(resource)
for shift in [-1, 1]:
y= coord_y + shift
if y < 0 or y >= self.world_height -1: continue
resource= self.get_map_matrix()[y][coord_x]
if resource and resource.is_player(): attackable_players.append(resource)
if resource and resource.is_player() and resource.is_alive(): attackable_players.append(resource)
return attackable_players