Showing the changes to interface/src/Application.cpp (1 of 4 files). Show all
Unified · Split
| @@ -229,7 +229,7 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 228 unmodified lines | |||
| 229 | #endif | 229 | #endif |
| 230 | 230 | ||
| 231 | // tell the NodeList instance who to tell the domain server we care about | 231 | // tell the NodeList instance who to tell the domain server we care about |
| 232 | nodeList->addSetOfNodeTypesToNodeInterestSet(QSet<NodeType_t>() << NodeType::AudioMixer << NodeType::AvatarMixer | 232 | nodeList->addSetOfNodeTypesToNodeInterestSet(NodeSet() << NodeType::AudioMixer << NodeType::AvatarMixer |
| 233 | << NodeType::VoxelServer << NodeType::ParticleServer | 233 | << NodeType::VoxelServer << NodeType::ParticleServer |
| 234 | << NodeType::MetavoxelServer); | 234 | << NodeType::MetavoxelServer); |
| 235 | 235 | ||
| @@ -648,8 +648,7 @@ void Application::resetProfile(const QString& username) { · 412 unmodified lines | |||
| 648 | updateWindowTitle(); | 648 | updateWindowTitle(); |
| 649 | } | 649 | } |
| 650 | 650 | ||
| 651 | void Application::controlledBroadcastToNodes(const QByteArray& packet, | 651 | void Application::controlledBroadcastToNodes(const QByteArray& packet, const NodeSet& destinationNodeTypes) { |
| 652 | const QSet<NodeType_t>& destinationNodeTypes) { | ||
| 653 | foreach(NodeType_t type, destinationNodeTypes) { | 652 | foreach(NodeType_t type, destinationNodeTypes) { |
| 654 | // Intercept data to voxel server when voxels are disabled | 653 | // Intercept data to voxel server when voxels are disabled |
| 655 | if (type == NodeType::VoxelServer && !Menu::getInstance()->isOptionChecked(MenuOption::Voxels)) { | 654 | if (type == NodeType::VoxelServer && !Menu::getInstance()->isOptionChecked(MenuOption::Voxels)) { |
| @@ -657,7 +656,7 @@ void Application::controlledBroadcastToNodes(const QByteArray& packet, · 1 unmodified line | |||
| 657 | } | 656 | } |
| 658 | 657 | ||
| 659 | // Perform the broadcast for one type | 658 | // Perform the broadcast for one type |
| 660 | int nReceivingNodes = NodeList::getInstance()->broadcastToNodes(packet, QSet<NodeType_t>() << type); | 659 | int nReceivingNodes = NodeList::getInstance()->broadcastToNodes(packet, NodeSet() << type); |
| 661 | 660 | ||
| 662 | // Feed number of bytes to corresponding channel of the bandwidth meter, if any (done otherwise) | 661 | // Feed number of bytes to corresponding channel of the bandwidth meter, if any (done otherwise) |
| 663 | BandwidthMeter::ChannelIndex channel; | 662 | BandwidthMeter::ChannelIndex channel; |
| @@ -1332,7 +1331,7 @@ void Application::wheelEvent(QWheelEvent* event) { · 668 unmodified lines | |||
| 1332 | 1331 | ||
| 1333 | void Application::sendPingPackets() { | 1332 | void Application::sendPingPackets() { |
| 1334 | QByteArray pingPacket = NodeList::getInstance()->constructPingPacket(); | 1333 | QByteArray pingPacket = NodeList::getInstance()->constructPingPacket(); |
| 1335 | getInstance()->controlledBroadcastToNodes(pingPacket, QSet<NodeType_t>() << NodeType::VoxelServer | 1334 | getInstance()->controlledBroadcastToNodes(pingPacket, NodeSet() << NodeType::VoxelServer |
| 1336 | << NodeType::ParticleServer | 1335 | << NodeType::ParticleServer |
| 1337 | << NodeType::AudioMixer << NodeType::AvatarMixer | 1336 | << NodeType::AudioMixer << NodeType::AvatarMixer |
| 1338 | << NodeType::MetavoxelServer); | 1337 | << NodeType::MetavoxelServer); |
| @@ -2363,7 +2362,7 @@ void Application::updateAvatar(float deltaTime) { · 1024 unmodified lines | |||
| 2363 | QByteArray avatarData = byteArrayWithPopluatedHeader(PacketTypeAvatarData); | 2362 | QByteArray avatarData = byteArrayWithPopluatedHeader(PacketTypeAvatarData); |
| 2364 | avatarData.append(_myAvatar.toByteArray()); | 2363 | avatarData.append(_myAvatar.toByteArray()); |
| 2365 | 2364 | ||
| 2366 | controlledBroadcastToNodes(avatarData, QSet<NodeType_t>() << NodeType::AvatarMixer); | 2365 | controlledBroadcastToNodes(avatarData, NodeSet() << NodeType::AvatarMixer); |
| 2367 | 2366 | ||
| 2368 | // Update _viewFrustum with latest camera and view frustum data... | 2367 | // Update _viewFrustum with latest camera and view frustum data... |
| 2369 | // NOTE: we get this from the view frustum, to make it simpler, since the | 2368 | // NOTE: we get this from the view frustum, to make it simpler, since the |