From 88930b36b494658a784ffa40694de6f1ef28b61f Mon Sep 17 00:00:00 2001 From: Patrick Owen Date: Sat, 5 Oct 2024 16:00:53 -0400 Subject: [PATCH] Don't crash when placing blocks with gameplay enabled --- server/src/sim.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/src/sim.rs b/server/src/sim.rs index 08ece64e..b048b520 100644 --- a/server/src/sim.rs +++ b/server/src/sim.rs @@ -402,11 +402,10 @@ impl Sim { if let Ok(position) = self.world.get::<&Position>(entity) { self.graph_entities.remove(position.node, entity); } - self.world.despawn(entity).unwrap(); - if !self.world.satisfies::<&InactiveCharacter>(entity).unwrap() { self.accumulated_changes.despawns.push(id); } + self.world.despawn(entity).unwrap(); } /// Collect information about all entities, for transmission to new clients