Fix conditions on some error logging spots

This commit is contained in:
Imbris 2023-06-03 17:20:39 -04:00
parent 77e1b1919a
commit ea77a443a2
2 changed files with 2 additions and 2 deletions

View File

@ -127,7 +127,7 @@ mod not_wasm {
) -> Option<Entity> { ) -> Option<Entity> {
if let Some(id) = id { if let Some(id) = id {
if let Some(e) = mapping.remove(&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::<ID>(); unexpected_entity::<ID>();
} }
Some(e) Some(e)

View File

@ -1215,7 +1215,7 @@ impl StateExt for State {
self.ecs().read_storage::<comp::Pos>().get(entity).copied(), self.ecs().read_storage::<comp::Pos>().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. // For now we expect all entities have a Uid component.
error!("Deleting entity without Uid component"); error!("Deleting entity without Uid component");
} }