Merge branch 'imbris/entity_count' into 'master'

Fill in entity_count in metrics

See merge request veloren/veloren!983
This commit is contained in:
Forest Anderson 2020-05-13 08:13:05 +00:00
commit 7703bc1214
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