1
0
Fork 0
mirror of https://github.com/doukutsu-rs/doukutsu-rs synced 2025-12-02 09:30:20 +00:00

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

View file

@ -1337,11 +1337,11 @@ impl GameScene {
} }
fn draw_debug_outlines(&self, state: &mut SharedGameState, ctx: &mut Context) -> GameResult { 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)?; 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)?; self.draw_debug_npc(boss, state, ctx)?;
} }