Skip to content

Commit

Permalink
remove opponent when they die
Browse files Browse the repository at this point in the history
  • Loading branch information
sorokya committed Oct 11, 2023
1 parent b2fa22f commit 221a168
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/map/map/act_npcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,11 @@ impl Map {
if let Some(npc) = self.npcs.get_mut(&index) {
npc.direction = direction;
npc.last_act = Some(Utc::now());

if killed_state == PlayerKilledState::Dead {
npc.opponents
.retain(|opponent| opponent.player_id != target_player_id);
}
}

Some(NPCUpdateAttack {
Expand Down

0 comments on commit 221a168

Please sign in to comment.