mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 12:57:59 +02: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
|
// potentially update the max full rate distance for this frame
|
||||||
maxAvatarDistanceThisFrame = std::max(maxAvatarDistanceThisFrame, distanceToAvatar);
|
maxAvatarDistanceThisFrame = std::max(maxAvatarDistanceThisFrame, distanceToAvatar);
|
||||||
|
|
||||||
if (distanceToAvatar != 0.0f
|
if (distanceToAvatar != 0.0f
|
||||||
&& distribution(generator) > (nodeData->getFullRateDistance() / distanceToAvatar)) {
|
&& distribution(generator) > (nodeData->getFullRateDistance() / distanceToAvatar)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
AvatarDataSequenceNumber lastSeqToReceiver = nodeData->getLastBroadcastSequenceNumber(otherNode->getUUID());
|
AvatarDataSequenceNumber lastSeqToReceiver = nodeData->getLastBroadcastSequenceNumber(otherNode->getUUID());
|
||||||
AvatarDataSequenceNumber lastSeqFromSender = otherNodeData->getLastReceivedSequenceNumber();
|
AvatarDataSequenceNumber lastSeqFromSender = otherNodeData->getLastReceivedSequenceNumber();
|
||||||
|
|
|
@ -141,4 +141,5 @@ void AvatarHashMap::removeAvatar(const QUuid& sessionUUID) {
|
||||||
|
|
||||||
void AvatarHashMap::sessionUUIDChanged(const QUuid& sessionUUID, const QUuid& oldUUID) {
|
void AvatarHashMap::sessionUUIDChanged(const QUuid& sessionUUID, const QUuid& oldUUID) {
|
||||||
_lastOwnerSessionUUID = oldUUID;
|
_lastOwnerSessionUUID = oldUUID;
|
||||||
|
emit avatarSessionChangedEvent(sessionUUID, oldUUID);
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,7 @@ public:
|
||||||
signals:
|
signals:
|
||||||
void avatarAddedEvent(const QUuid& sessionUUID);
|
void avatarAddedEvent(const QUuid& sessionUUID);
|
||||||
void avatarRemovedEvent(const QUuid& sessionUUID);
|
void avatarRemovedEvent(const QUuid& sessionUUID);
|
||||||
|
void avatarSessionChangedEvent(const QUuid& sessionUUID,const QUuid& oldUUID);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
bool isAvatarInRange(const glm::vec3 & position, const float range);
|
bool isAvatarInRange(const glm::vec3 & position, const float range);
|
||||||
|
|
Loading…
Reference in a new issue