mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-08-08 05:06:55 +02:00
Update avatar query names
This commit is contained in:
parent
d7e9fdc6a4
commit
d87cd2af6e
4 changed files with 12 additions and 12 deletions
|
@ -548,18 +548,18 @@ void Agent::setIsAvatar(bool isAvatar) {
|
||||||
if (_isAvatar && !_avatarIdentityTimer) {
|
if (_isAvatar && !_avatarIdentityTimer) {
|
||||||
// set up the avatar timers
|
// set up the avatar timers
|
||||||
_avatarIdentityTimer = new QTimer(this);
|
_avatarIdentityTimer = new QTimer(this);
|
||||||
_avatarViewTimer = new QTimer(this);
|
_avatarQueryTimer = new QTimer(this);
|
||||||
|
|
||||||
// connect our slot
|
// connect our slot
|
||||||
connect(_avatarIdentityTimer, &QTimer::timeout, this, &Agent::sendAvatarIdentityPacket);
|
connect(_avatarIdentityTimer, &QTimer::timeout, this, &Agent::sendAvatarIdentityPacket);
|
||||||
connect(_avatarViewTimer, &QTimer::timeout, this, &Agent::sendAvatarViewFrustum);
|
connect(_avatarQueryTimer, &QTimer::timeout, this, &Agent::queryAvatars);
|
||||||
|
|
||||||
static const int AVATAR_IDENTITY_PACKET_SEND_INTERVAL_MSECS = 1000;
|
static const int AVATAR_IDENTITY_PACKET_SEND_INTERVAL_MSECS = 1000;
|
||||||
static const int AVATAR_VIEW_PACKET_SEND_INTERVAL_MSECS = 1000;
|
static const int AVATAR_VIEW_PACKET_SEND_INTERVAL_MSECS = 1000;
|
||||||
|
|
||||||
// start the timers
|
// start the timers
|
||||||
_avatarIdentityTimer->start(AVATAR_IDENTITY_PACKET_SEND_INTERVAL_MSECS); // FIXME - we shouldn't really need to constantly send identity packets
|
_avatarIdentityTimer->start(AVATAR_IDENTITY_PACKET_SEND_INTERVAL_MSECS); // FIXME - we shouldn't really need to constantly send identity packets
|
||||||
_avatarViewTimer->start(AVATAR_VIEW_PACKET_SEND_INTERVAL_MSECS);
|
_avatarQueryTimer->start(AVATAR_VIEW_PACKET_SEND_INTERVAL_MSECS);
|
||||||
|
|
||||||
// tell the avatarAudioTimer to start ticking
|
// tell the avatarAudioTimer to start ticking
|
||||||
QMetaObject::invokeMethod(&_avatarAudioTimer, "start");
|
QMetaObject::invokeMethod(&_avatarAudioTimer, "start");
|
||||||
|
@ -572,9 +572,9 @@ void Agent::setIsAvatar(bool isAvatar) {
|
||||||
delete _avatarIdentityTimer;
|
delete _avatarIdentityTimer;
|
||||||
_avatarIdentityTimer = nullptr;
|
_avatarIdentityTimer = nullptr;
|
||||||
|
|
||||||
_avatarViewTimer->stop();
|
_avatarQueryTimer->stop();
|
||||||
delete _avatarViewTimer;
|
delete _avatarQueryTimer;
|
||||||
_avatarViewTimer = nullptr;
|
_avatarQueryTimer = nullptr;
|
||||||
|
|
||||||
// The avatar mixer never times out a connection (e.g., based on identity or data packets)
|
// The avatar mixer never times out a connection (e.g., based on identity or data packets)
|
||||||
// but rather keeps avatars in its list as long as "connected". As a result, clients timeout
|
// but rather keeps avatars in its list as long as "connected". As a result, clients timeout
|
||||||
|
@ -607,7 +607,7 @@ void Agent::sendAvatarIdentityPacket() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Agent::sendAvatarViewFrustum() {
|
void Agent::queryAvatars() {
|
||||||
auto scriptedAvatar = DependencyManager::get<ScriptableAvatar>();
|
auto scriptedAvatar = DependencyManager::get<ScriptableAvatar>();
|
||||||
|
|
||||||
ViewFrustum view;
|
ViewFrustum view;
|
||||||
|
|
|
@ -97,7 +97,7 @@ private:
|
||||||
void setAvatarSound(SharedSoundPointer avatarSound) { _avatarSound = avatarSound; }
|
void setAvatarSound(SharedSoundPointer avatarSound) { _avatarSound = avatarSound; }
|
||||||
|
|
||||||
void sendAvatarIdentityPacket();
|
void sendAvatarIdentityPacket();
|
||||||
void sendAvatarViewFrustum();
|
void queryAvatars();
|
||||||
|
|
||||||
QString _scriptContents;
|
QString _scriptContents;
|
||||||
QTimer* _scriptRequestTimeout { nullptr };
|
QTimer* _scriptRequestTimeout { nullptr };
|
||||||
|
@ -107,7 +107,7 @@ private:
|
||||||
int _numAvatarSoundSentBytes = 0;
|
int _numAvatarSoundSentBytes = 0;
|
||||||
bool _isAvatar = false;
|
bool _isAvatar = false;
|
||||||
QTimer* _avatarIdentityTimer = nullptr;
|
QTimer* _avatarIdentityTimer = nullptr;
|
||||||
QTimer* _avatarViewTimer = nullptr;
|
QTimer* _avatarQueryTimer = nullptr;
|
||||||
QHash<QUuid, quint16> _outgoingScriptAudioSequenceNumbers;
|
QHash<QUuid, quint16> _outgoingScriptAudioSequenceNumbers;
|
||||||
|
|
||||||
AudioGate _audioGate;
|
AudioGate _audioGate;
|
||||||
|
|
|
@ -5682,7 +5682,7 @@ void Application::update(float deltaTime) {
|
||||||
if (DependencyManager::get<SceneScriptingInterface>()->shouldRenderEntities()) {
|
if (DependencyManager::get<SceneScriptingInterface>()->shouldRenderEntities()) {
|
||||||
queryOctree(NodeType::EntityServer, PacketType::EntityQuery);
|
queryOctree(NodeType::EntityServer, PacketType::EntityQuery);
|
||||||
}
|
}
|
||||||
sendAvatarViewFrustum();
|
queryAvatars();
|
||||||
|
|
||||||
_lastQueriedViews = _conicalViews;
|
_lastQueriedViews = _conicalViews;
|
||||||
_lastQueriedTime = now;
|
_lastQueriedTime = now;
|
||||||
|
@ -5857,7 +5857,7 @@ void Application::update(float deltaTime) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::sendAvatarViewFrustum() {
|
void Application::queryAvatars() {
|
||||||
auto avatarPacket = NLPacket::create(PacketType::AvatarQuery);
|
auto avatarPacket = NLPacket::create(PacketType::AvatarQuery);
|
||||||
auto destinationBuffer = reinterpret_cast<unsigned char*>(avatarPacket->getPayload());
|
auto destinationBuffer = reinterpret_cast<unsigned char*>(avatarPacket->getPayload());
|
||||||
unsigned char* bufferStart = destinationBuffer;
|
unsigned char* bufferStart = destinationBuffer;
|
||||||
|
|
|
@ -492,9 +492,9 @@ private:
|
||||||
void updateDialogs(float deltaTime) const;
|
void updateDialogs(float deltaTime) const;
|
||||||
|
|
||||||
void queryOctree(NodeType_t serverType, PacketType packetType);
|
void queryOctree(NodeType_t serverType, PacketType packetType);
|
||||||
|
void queryAvatars();
|
||||||
|
|
||||||
int sendNackPackets();
|
int sendNackPackets();
|
||||||
void sendAvatarViewFrustum();
|
|
||||||
|
|
||||||
std::shared_ptr<MyAvatar> getMyAvatar() const;
|
std::shared_ptr<MyAvatar> getMyAvatar() const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue