mirror of
https://github.com/overte-org/overte.git
synced 2025-08-11 01:53:10 +02:00
Stop sending avatars when over bandwidth quota
This commit is contained in:
parent
e1aba52c23
commit
9e0c21065e
1 changed files with 5 additions and 0 deletions
|
@ -425,6 +425,11 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node)
|
||||||
// NOTE: Here's where we determine if we are over budget and drop to bare minimum data
|
// NOTE: Here's where we determine if we are over budget and drop to bare minimum data
|
||||||
int minimRemainingAvatarBytes = minimumBytesPerAvatar * remainingAvatars;
|
int minimRemainingAvatarBytes = minimumBytesPerAvatar * remainingAvatars;
|
||||||
bool overBudget = (identityBytesSent + numAvatarDataBytes + minimRemainingAvatarBytes) > maxAvatarBytesPerFrame;
|
bool overBudget = (identityBytesSent + numAvatarDataBytes + minimRemainingAvatarBytes) > maxAvatarBytesPerFrame;
|
||||||
|
if (overBudget) {
|
||||||
|
_stats.overBudgetAvatars += remainingAvatars + 1;
|
||||||
|
overBudgetAvatars += remainingAvatars + 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
auto startAvatarDataPacking = chrono::high_resolution_clock::now();
|
auto startAvatarDataPacking = chrono::high_resolution_clock::now();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue