fix npcs without a faction not respawning

This commit is contained in:
Isse 2023-04-12 10:18:09 +02:00
parent 0bb6fa7946
commit 2d83a8a1e4

View File

@ -59,7 +59,7 @@ fn on_death(ctx: EventCtx<SimulateNpcs, OnDeath>) {
.iter()
.filter(|(id, site)| {
Some(*id) != npc.home
&& site.faction == npc.faction
&& (npc.faction.is_none() || site.faction == npc.faction)
&& site.world_site.map_or(false, |s| {
matches!(ctx.index.sites.get(s).kind, SiteKind::Refactor(_)
| SiteKind::CliffTown(_)