mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'imbris/entity_count' into 'master'
Fill in entity_count in metrics See merge request veloren/veloren!983
This commit is contained in:
commit
a6fb1bd37f
@ -170,8 +170,7 @@ fn swap_inventory_loadout(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn swap_loadout(slot_a: EquipSlot, slot_b: EquipSlot, loadout: &mut 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
|
// Ensure that the slots are not the same
|
||||||
// occasionsally)
|
|
||||||
if slot_a == slot_b {
|
if slot_a == slot_b {
|
||||||
warn!("Tried to swap equip slot with itself");
|
warn!("Tried to swap equip slot with itself");
|
||||||
return;
|
return;
|
||||||
|
@ -446,6 +446,9 @@ impl Server {
|
|||||||
});
|
});
|
||||||
self.metrics.chonks_count.set(chonk_cnt as i64);
|
self.metrics.chonks_count.set(chonk_cnt as i64);
|
||||||
self.metrics.chunks_count.set(chunk_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.entity_count.set(self.state.);
|
||||||
self.metrics
|
self.metrics
|
||||||
|
Loading…
x
Reference in New Issue
Block a user