hide dead npcs in debug view

This commit is contained in:
Alula 2020-11-25 15:15:56 +01:00
parent ef20d86aa0
commit e7d421f384
No known key found for this signature in database
GPG Key ID: 3E00485503A1D8BA
1 changed files with 2 additions and 2 deletions

View File

@ -1337,11 +1337,11 @@ impl GameScene {
}
fn draw_debug_outlines(&self, state: &mut SharedGameState, ctx: &mut Context) -> GameResult {
for npc in self.npc_map.npcs.values().map(|n| n.borrow()) {
for npc in self.npc_map.npcs.values().map(|n| n.borrow()).filter(|n| n.cond.alive()) {
self.draw_debug_npc(npc.deref(), state, ctx)?;
}
for boss in self.npc_map.boss_map.parts.iter() {
for boss in self.npc_map.boss_map.parts.iter().filter(|n| n.cond.alive()) {
self.draw_debug_npc(boss, state, ctx)?;
}