mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-14 11:46:34 +02:00
use the performance tuning ratio in avatar mixer to send less
This commit is contained in:
parent
4f7a8473fd
commit
ce214bc439
1 changed files with 2 additions and 1 deletions
|
@ -84,7 +84,8 @@ void AvatarMixer::broadcastAvatarData() {
|
|||
// at a distance of twice the full rate distance, there will be a 50% chance of sending this avatar's update
|
||||
const float FULL_RATE_DISTANCE = 2.f;
|
||||
// Decide whether to send this avatar's data based on it's distance from us
|
||||
if ((distanceToAvatar == 0.f) || (randFloat() < FULL_RATE_DISTANCE / distanceToAvatar)) {
|
||||
if ((distanceToAvatar == 0.f) || (randFloat() < FULL_RATE_DISTANCE / distanceToAvatar)
|
||||
* (1 - _performanceThrottlingRatio)) {
|
||||
QByteArray avatarByteArray;
|
||||
avatarByteArray.append(otherNode->getUUID().toRfc4122());
|
||||
avatarByteArray.append(otherAvatar.toByteArray());
|
||||
|
|
Loading…
Reference in a new issue