Fill in entity_count in metrics

This commit is contained in:
Imbris 2020-05-12 19:44:27 -04:00
parent 19a0ffb673
commit 8f857e6e11
2 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -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