mirror of
https://github.com/overte-org/overte.git
synced 2025-04-24 05:53:29 +02:00
fix for 0 entity avg ping
This commit is contained in:
parent
ff3a0480fe
commit
6f14eb2206
1 changed files with 5 additions and 2 deletions
|
@ -129,8 +129,8 @@ void Stats::updateStats() {
|
|||
STAT_UPDATE(audioPing, audioMixerNode ? audioMixerNode->getPingMs() : -1);
|
||||
STAT_UPDATE(avatarPing, avatarMixerNode ? avatarMixerNode->getPingMs() : -1);
|
||||
|
||||
//// Now handle voxel servers, since there could be more than one, we average their ping times
|
||||
unsigned long totalPingOctree = 0;
|
||||
//// Now handle entity servers, since there could be more than one, we average their ping times
|
||||
int totalPingOctree = 0;
|
||||
int octreeServerCount = 0;
|
||||
int pingOctreeMax = 0;
|
||||
nodeList->eachNode([&](const SharedNodePointer& node) {
|
||||
|
@ -143,6 +143,9 @@ void Stats::updateStats() {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
// update the entities ping with the average for all connected entity servers
|
||||
STAT_UPDATE(entitiesPing, octreeServerCount ? totalPingOctree / octreeServerCount : -1);
|
||||
} else {
|
||||
// -2 causes the QML to hide the ping column
|
||||
STAT_UPDATE(audioPing, -2);
|
||||
|
|
Loading…
Reference in a new issue