mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
added AvatarList.avatarSessionChanged(sessionUUID, oldUUID) for AC scripts.
This commit is contained in:
parent
f5d12ee2c6
commit
d34fc35544
3 changed files with 5 additions and 3 deletions
|
@ -254,10 +254,10 @@ void AvatarMixer::broadcastAvatarData() {
|
|||
// potentially update the max full rate distance for this frame
|
||||
maxAvatarDistanceThisFrame = std::max(maxAvatarDistanceThisFrame, distanceToAvatar);
|
||||
|
||||
if (distanceToAvatar != 0.0f
|
||||
if (distanceToAvatar != 0.0f
|
||||
&& distribution(generator) > (nodeData->getFullRateDistance() / distanceToAvatar)) {
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
AvatarDataSequenceNumber lastSeqToReceiver = nodeData->getLastBroadcastSequenceNumber(otherNode->getUUID());
|
||||
AvatarDataSequenceNumber lastSeqFromSender = otherNodeData->getLastReceivedSequenceNumber();
|
||||
|
|
|
@ -141,4 +141,5 @@ void AvatarHashMap::removeAvatar(const QUuid& sessionUUID) {
|
|||
|
||||
void AvatarHashMap::sessionUUIDChanged(const QUuid& sessionUUID, const QUuid& oldUUID) {
|
||||
_lastOwnerSessionUUID = oldUUID;
|
||||
emit avatarSessionChangedEvent(sessionUUID, oldUUID);
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ public:
|
|||
signals:
|
||||
void avatarAddedEvent(const QUuid& sessionUUID);
|
||||
void avatarRemovedEvent(const QUuid& sessionUUID);
|
||||
void avatarSessionChangedEvent(const QUuid& sessionUUID,const QUuid& oldUUID);
|
||||
|
||||
public slots:
|
||||
bool isAvatarInRange(const glm::vec3 & position, const float range);
|
||||
|
|
Loading…
Reference in a new issue