mirror of
https://github.com/lubosz/overte.git
synced 2025-08-27 17:25:50 +02:00
remove debugging code
This commit is contained in:
parent
a26dca73b1
commit
834a447d62
8 changed files with 1 additions and 51 deletions
|
@ -583,7 +583,6 @@ void Agent::setIsAvatar(bool isAvatar) {
|
|||
void Agent::sendAvatarIdentityPacket() {
|
||||
if (_isAvatar) {
|
||||
auto scriptedAvatar = DependencyManager::get<ScriptableAvatar>();
|
||||
qDebug() << __FUNCTION__ << "about to call sendIdentityPacket()";
|
||||
scriptedAvatar->sendIdentityPacket();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,15 +70,11 @@ AvatarMixer::~AvatarMixer() {
|
|||
}
|
||||
|
||||
void AvatarMixer::sendIdentityPacket(AvatarMixerClientData* nodeData, const SharedNodePointer& destinationNode) {
|
||||
qDebug() << __FUNCTION__ << "about to call nodeData->getAvatar().identityByteArray()... for node:" << nodeData->getNodeID() << "destinationNode:" << destinationNode->getUUID();
|
||||
QByteArray individualData = nodeData->getAvatar().identityByteArray();
|
||||
individualData.replace(0, NUM_BYTES_RFC4122_UUID, nodeData->getNodeID().toRfc4122());
|
||||
qDebug() << __FUNCTION__ << "REPLACED " << NUM_BYTES_RFC4122_UUID << "bytes in identityByteArray with:" << nodeData->getNodeID() << ".toRfc4122()...";
|
||||
|
||||
auto identityPackets = NLPacketList::create(PacketType::AvatarIdentity, QByteArray(), true, true);
|
||||
identityPackets->write(individualData);
|
||||
DependencyManager::get<NodeList>()->sendPacketList(std::move(identityPackets), *destinationNode);
|
||||
|
||||
++_sumIdentityPackets;
|
||||
}
|
||||
|
||||
|
@ -394,7 +390,6 @@ void AvatarMixer::handleRequestsDomainListDataPacket(QSharedPointer<ReceivedMess
|
|||
}
|
||||
|
||||
void AvatarMixer::handleAvatarIdentityPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode) {
|
||||
qDebug() << __FUNCTION__;
|
||||
auto start = usecTimestampNow();
|
||||
auto nodeList = DependencyManager::get<NodeList>();
|
||||
getOrCreateClientData(senderNode);
|
||||
|
@ -406,14 +401,9 @@ void AvatarMixer::handleAvatarIdentityPacket(QSharedPointer<ReceivedMessage> mes
|
|||
|
||||
// parse the identity packet and update the change timestamp if appropriate
|
||||
AvatarData::Identity identity;
|
||||
|
||||
qCDebug(avatars) << __FUNCTION__ << "about to call parseAvatarIdentityPacket() for packet from node:" << nodeData->getNodeID();
|
||||
AvatarData::parseAvatarIdentityPacket(message->getMessage(), identity);
|
||||
|
||||
bool identityChanged = false;
|
||||
bool displayNameChanged = false;
|
||||
|
||||
qCDebug(avatars) << __FUNCTION__ << "about to call processAvatarIdentity() node:" << nodeData->getNodeID();
|
||||
avatar.processAvatarIdentity(identity, identityChanged, displayNameChanged);
|
||||
if (identityChanged) {
|
||||
QMutexLocker nodeDataLocker(&nodeData->getMutex());
|
||||
|
|
|
@ -67,15 +67,11 @@ void AvatarMixerSlave::processIncomingPackets(const SharedNodePointer& node) {
|
|||
|
||||
|
||||
int AvatarMixerSlave::sendIdentityPacket(const AvatarMixerClientData* nodeData, const SharedNodePointer& destinationNode) {
|
||||
qDebug() << __FUNCTION__ << "about to call nodeData->getConstAvatarData().identityByteArray()... for node:" << nodeData->getNodeID() << "destinationNode:" << destinationNode->getUUID();
|
||||
QByteArray individualData = nodeData->getConstAvatarData()->identityByteArray();
|
||||
individualData.replace(0, NUM_BYTES_RFC4122_UUID, nodeData->getNodeID().toRfc4122()); // FIXME, this looks suspicious
|
||||
qDebug() << __FUNCTION__ << "REPLACED " << NUM_BYTES_RFC4122_UUID << "bytes in identityByteArray with:" << nodeData->getNodeID() << ".toRfc4122()...";
|
||||
|
||||
auto identityPackets = NLPacketList::create(PacketType::AvatarIdentity, QByteArray(), true, true);
|
||||
identityPackets->write(individualData);
|
||||
DependencyManager::get<NodeList>()->sendPacketList(std::move(identityPackets), *destinationNode);
|
||||
|
||||
_stats.numIdentityPackets++;
|
||||
return individualData.size();
|
||||
}
|
||||
|
@ -306,11 +302,6 @@ void AvatarMixerSlave::broadcastAvatarData(const SharedNodePointer& node) {
|
|||
// If the time that the mixer sent AVATAR DATA about Avatar B to Avatar A is BEFORE OR EQUAL TO
|
||||
// the time that Avatar B flagged an IDENTITY DATA change, send IDENTITY DATA about Avatar B to Avatar A.
|
||||
if (nodeData->getLastBroadcastTime(otherNode->getUUID()) <= otherNodeData->getIdentityChangeTimestamp()) {
|
||||
qCDebug(avatars) << __FUNCTION__ << "about to call sendIdentityPacket()"
|
||||
<< "other node:" << otherNode->getUUID()
|
||||
<< "destination node:" << nodeData->getNodeID()
|
||||
<< "nodeData->getLastBroadcastTime(otherNode->getUUID()):" << nodeData->getLastBroadcastTime(otherNode->getUUID())
|
||||
<< "otherNodeData->getIdentityChangeTimestamp():" << otherNodeData->getIdentityChangeTimestamp();
|
||||
identityBytesSent += sendIdentityPacket(otherNodeData, node);
|
||||
}
|
||||
|
||||
|
|
|
@ -5244,7 +5244,6 @@ void Application::nodeActivated(SharedNodePointer node) {
|
|||
|
||||
if (node->getType() == NodeType::AvatarMixer) {
|
||||
// new avatar mixer, send off our identity packet right away
|
||||
qDebug() << __FUNCTION__ << "about to call... getMyAvatar()->sendIdentityPacket();";
|
||||
getMyAvatar()->markIdentityDataChanged();
|
||||
getMyAvatar()->sendIdentityPacket();
|
||||
getMyAvatar()->resetLastSent();
|
||||
|
|
|
@ -413,7 +413,6 @@ void MyAvatar::update(float deltaTime) {
|
|||
Q_ARG(glm::vec3, (halfBoundingBoxDimensions*2.0f)));
|
||||
|
||||
if (getIdentityDataChanged()) {
|
||||
qDebug() << __FUNCTION__ << "about to call... sendIdentityPacket();";
|
||||
sendIdentityPacket();
|
||||
}
|
||||
|
||||
|
|
|
@ -1489,9 +1489,6 @@ void AvatarData::processAvatarIdentity(const Identity& identity, bool& identityC
|
|||
return;
|
||||
}
|
||||
|
||||
qCDebug(avatars) << __FUNCTION__ << "got identity packet for avatar " << getSessionUUID()
|
||||
<< "identity.updatedAt:" << identity.updatedAt << "_identityUpdatedAt:" << _identityUpdatedAt;
|
||||
|
||||
if (_firstSkeletonCheck || (identity.skeletonModelURL != cannonicalSkeletonModelURL(emptyURL))) {
|
||||
setSkeletonModelURL(identity.skeletonModelURL);
|
||||
identityChanged = true;
|
||||
|
@ -1525,7 +1522,6 @@ void AvatarData::processAvatarIdentity(const Identity& identity, bool& identityC
|
|||
// use the timestamp from this identity, since we want to honor the updated times in "server clock"
|
||||
// this will overwrite any changes we made locally to this AvatarData's _identityUpdatedAt
|
||||
_identityUpdatedAt = identity.updatedAt;
|
||||
qDebug() << __FUNCTION__ << "_identityUpdatedAt:" << _identityUpdatedAt;
|
||||
}
|
||||
|
||||
QByteArray AvatarData::identityByteArray() const {
|
||||
|
@ -1534,15 +1530,6 @@ QByteArray AvatarData::identityByteArray() const {
|
|||
const QUrl& urlToSend = cannonicalSkeletonModelURL(emptyURL); // depends on _skeletonModelURL
|
||||
|
||||
_avatarEntitiesLock.withReadLock([&] {
|
||||
|
||||
qDebug() << "AvatarData::identityByteArray() ... "
|
||||
<< "session:" << getSessionUUID()
|
||||
<< "url:" << urlToSend
|
||||
<< "displayName:" << _displayName
|
||||
<< "sessionDisplayName:" << getSessionDisplayNameForTransport()
|
||||
<< "identityUpdatedAt:" << _identityUpdatedAt;
|
||||
|
||||
|
||||
identityStream << getSessionUUID()
|
||||
<< urlToSend
|
||||
<< _attachmentData
|
||||
|
@ -1726,29 +1713,16 @@ void AvatarData::sendAvatarDataPacket() {
|
|||
}
|
||||
|
||||
void AvatarData::sendIdentityPacket() {
|
||||
qDebug() << __FUNCTION__;
|
||||
auto nodeList = DependencyManager::get<NodeList>();
|
||||
|
||||
qDebug() << __FUNCTION__ << "about to call identityByteArray()... for getSessionUUID:" << getSessionUUID();
|
||||
QByteArray identityData = identityByteArray();
|
||||
|
||||
auto packetList = NLPacketList::create(PacketType::AvatarIdentity, QByteArray(), true, true);
|
||||
packetList->write(identityData);
|
||||
nodeList->eachMatchingNode(
|
||||
[&](const SharedNodePointer& node)->bool {
|
||||
if (node->getType() == NodeType::AvatarMixer) {
|
||||
qDebug() << "AvatarData::sendIdentityPacket()... found mixer node, node->getActiveSocket():" << node->getActiveSocket()
|
||||
<< "getPublicSocket()" << node->getPublicSocket()
|
||||
<< "getLocalSocket()" << node->getLocalSocket()
|
||||
<< "getSymmetricSocket()" << node->getSymmetricSocket()
|
||||
<< "getActiveSocket()" << *node->getActiveSocket();
|
||||
|
||||
}
|
||||
|
||||
return node->getType() == NodeType::AvatarMixer && node->getActiveSocket();
|
||||
},
|
||||
[&](const SharedNodePointer& node) {
|
||||
qDebug() << "AvatarData::sendIdentityPacket()... about to call.... nodeList->sendPacketList(std::move(packetList), *node);";
|
||||
nodeList->sendPacketList(std::move(packetList), *node);
|
||||
});
|
||||
|
||||
|
|
|
@ -437,8 +437,6 @@ qint64 LimitedNodeList::sendPacketList(std::unique_ptr<NLPacketList> packetList,
|
|||
qint64 LimitedNodeList::sendPacketList(std::unique_ptr<NLPacketList> packetList, const Node& destinationNode) {
|
||||
auto activeSocket = destinationNode.getActiveSocket();
|
||||
if (activeSocket) {
|
||||
qDebug() << __FUNCTION__ << "activeSocket:" << *activeSocket;
|
||||
|
||||
// close the last packet in the list
|
||||
packetList->closeCurrentPacket();
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "TCPVegasCC.h"
|
||||
#include "Connection.h"
|
||||
|
||||
#define UDT_CONNECTION_DEBUG
|
||||
//#define UDT_CONNECTION_DEBUG
|
||||
|
||||
class UDTTest;
|
||||
|
||||
|
|
Loading…
Reference in a new issue