mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 06:53:59 +02:00
repair crazy references to node ponter from old iterator style
This commit is contained in:
parent
66f50c38e3
commit
9efb391ecf
6 changed files with 8 additions and 8 deletions
|
@ -272,7 +272,7 @@ void AudioMixer::run() {
|
|||
foreach(SharedNodePointer node, nodeList->getNodeHash()) {
|
||||
if (node->getType() == NODE_TYPE_AGENT && node->getActiveSocket() && node->getLinkedData()
|
||||
&& ((AudioMixerClientData*) node->getLinkedData())->getAvatarAudioRingBuffer()) {
|
||||
prepareMixForListeningNode(&(*node));
|
||||
prepareMixForListeningNode(node.data());
|
||||
|
||||
memcpy(clientPacket + numBytesPacketHeader, _clientSamples, sizeof(_clientSamples));
|
||||
nodeList->getNodeSocket().writeDatagram((char*) clientPacket, sizeof(clientPacket),
|
||||
|
|
|
@ -80,7 +80,7 @@ void broadcastAvatarData() {
|
|||
if (otherNode->getLinkedData() && otherNode->getUUID() != node->getUUID()) {
|
||||
|
||||
unsigned char* avatarDataEndpoint = addNodeToBroadcastPacket((unsigned char*)&avatarDataBuffer[0],
|
||||
&*otherNode);
|
||||
otherNode.data());
|
||||
int avatarDataLength = avatarDataEndpoint - (unsigned char*)&avatarDataBuffer;
|
||||
|
||||
if (avatarDataLength + packetLength <= MAX_PACKET_SIZE) {
|
||||
|
|
|
@ -207,7 +207,7 @@ void DomainServer::readAvailableDatagrams() {
|
|||
|
||||
// don't send avatar nodes to other avatars, that will come from avatar mixer
|
||||
if (nodeType != NODE_TYPE_AGENT || node->getType() != NODE_TYPE_AGENT) {
|
||||
currentBufferPos = addNodeToBroadcastPacket(currentBufferPos, &(*node));
|
||||
currentBufferPos = addNodeToBroadcastPacket(currentBufferPos, node.data());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -322,7 +322,7 @@ int DomainServer::civetwebRequestHandler(struct mg_connection *connection) {
|
|||
if (node->getLinkedData()) {
|
||||
// add the node using the UUID as the key
|
||||
QString uuidString = uuidStringWithoutCurlyBraces(node->getUUID());
|
||||
assignedNodesJSON[uuidString] = jsonObjectForNode(&(*node));
|
||||
assignedNodesJSON[uuidString] = jsonObjectForNode(node.data());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -263,7 +263,7 @@ void VoxelStatsDialog::showOctreeServersOfType(int& serverCount, NODE_TYPE serve
|
|||
std::stringstream extraDetails("");
|
||||
std::stringstream linkDetails("");
|
||||
|
||||
if (nodeList->getNodeActiveSocketOrPing(&(*node))) {
|
||||
if (nodeList->getNodeActiveSocketOrPing(node.data())) {
|
||||
serverDetails << "active ";
|
||||
} else {
|
||||
serverDetails << "inactive ";
|
||||
|
|
|
@ -45,7 +45,7 @@ bool JurisdictionListener::queueJurisdictionRequest() {
|
|||
NodeList* nodeList = NodeList::getInstance();
|
||||
|
||||
foreach(SharedNodePointer node, nodeList->getNodeHash()) {
|
||||
if (nodeList->getNodeActiveSocketOrPing(&(*node)) &&
|
||||
if (nodeList->getNodeActiveSocketOrPing(node.data()) &&
|
||||
node->getType() == getNodeType()) {
|
||||
const HifiSockAddr* nodeAddress = node->getActiveSocket();
|
||||
PacketSender::queuePacketForSending(*nodeAddress, bufferOut, sizeOut);
|
||||
|
|
|
@ -61,7 +61,7 @@ bool OctreeEditPacketSender::serversExist() const {
|
|||
foreach(SharedNodePointer node, nodeList->getNodeHash()) {
|
||||
// only send to the NodeTypes that are getMyNodeType()
|
||||
if (node->getType() == getMyNodeType()) {
|
||||
if (nodeList->getNodeActiveSocketOrPing(&(*node))) {
|
||||
if (nodeList->getNodeActiveSocketOrPing(node.data())) {
|
||||
QUuid nodeUUID = node->getUUID();
|
||||
// If we've got Jurisdictions set, then check to see if we know the jurisdiction for this server
|
||||
if (_serverJurisdictions) {
|
||||
|
@ -91,7 +91,7 @@ void OctreeEditPacketSender::queuePacketToNode(const QUuid& nodeUUID, unsigned c
|
|||
// only send to the NodeTypes that are getMyNodeType()
|
||||
if (node->getType() == getMyNodeType() &&
|
||||
((node->getUUID() == nodeUUID) || (nodeUUID.isNull()))) {
|
||||
if (nodeList->getNodeActiveSocketOrPing(&(*node))) {
|
||||
if (nodeList->getNodeActiveSocketOrPing(node.data())) {
|
||||
const HifiSockAddr* nodeAddress = node->getActiveSocket();
|
||||
queuePacketForSending(*nodeAddress, buffer, length);
|
||||
|
||||
|
|
Loading…
Reference in a new issue