From 8f857e6e11a08c4a864665f495979a7405bef16c Mon Sep 17 00:00:00 2001 From: Imbris Date: Tue, 12 May 2020 19:44:27 -0400 Subject: [PATCH] Fill in entity_count in metrics --- common/src/comp/inventory/slot.rs | 3 +-- server/src/lib.rs | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/src/comp/inventory/slot.rs b/common/src/comp/inventory/slot.rs index 276c464402..3495596774 100644 --- a/common/src/comp/inventory/slot.rs +++ b/common/src/comp/inventory/slot.rs @@ -170,8 +170,7 @@ fn swap_inventory_loadout( } fn swap_loadout(slot_a: EquipSlot, slot_b: EquipSlot, loadout: &mut Loadout) { - // Ensure that the slots are not the same (somehow the voxygen does this - // occasionsally) + // Ensure that the slots are not the same if slot_a == slot_b { warn!("Tried to swap equip slot with itself"); return; diff --git a/server/src/lib.rs b/server/src/lib.rs index eb29844b80..81c42d80f3 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -446,6 +446,9 @@ impl Server { }); self.metrics.chonks_count.set(chonk_cnt as i64); self.metrics.chunks_count.set(chunk_cnt as i64); + + let entity_count = self.state.ecs().entities().join().count(); + self.metrics.entity_count.set(entity_count as i64); } //self.metrics.entity_count.set(self.state.); self.metrics