diff --git a/common/src/uid.rs b/common/src/uid.rs index 698b863329..8ca167b116 100644 --- a/common/src/uid.rs +++ b/common/src/uid.rs @@ -127,7 +127,7 @@ mod not_wasm { ) -> Option { if let Some(id) = id { if let Some(e) = mapping.remove(&id) { - if expected.map_or(true, |expected| e != expected) { + if expected.map_or(false, |expected| e != expected) { unexpected_entity::(); } Some(e) diff --git a/server/src/state_ext.rs b/server/src/state_ext.rs index 323d813d9c..5bbe68ec24 100644 --- a/server/src/state_ext.rs +++ b/server/src/state_ext.rs @@ -1215,7 +1215,7 @@ impl StateExt for State { self.ecs().read_storage::().get(entity).copied(), ); - if maybe_uid.or(exit_ingame.flatten()).is_some() { + if maybe_uid.or(exit_ingame.flatten()).is_none() { // For now we expect all entities have a Uid component. error!("Deleting entity without Uid component"); }