Showing the changes to interface/src/VoxelPacketProcessor.cpp (1 of 27 files). Show all
Unified · Split
| @@ -11,14 +11,16 @@ · 10 unmodified lines | |||
| 11 | #include <PerfStat.h> | 11 | #include <PerfStat.h> |
| 12 | 12 | ||
| 13 | #include "Application.h" | 13 | #include "Application.h" |
| 14 | #include "Menu.h" | ||
| 14 | #include "VoxelPacketProcessor.h" | 15 | #include "VoxelPacketProcessor.h" |
| 15 | 16 | ||
| 16 | void VoxelPacketProcessor::processPacket(sockaddr& senderAddress, unsigned char* packetData, ssize_t packetLength) { | 17 | void VoxelPacketProcessor::processPacket(sockaddr& senderAddress, unsigned char* packetData, ssize_t packetLength) { |
| 17 | Application* app = Application::getInstance(); | 18 | PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings), |
| 18 | 19 | "VoxelPacketProcessor::processPacket()"); | |
| 19 | PerformanceWarning warn(app->_renderPipelineWarnings->isChecked(),"VoxelPacketProcessor::processPacket()"); | ||
| 20 | ssize_t messageLength = packetLength; | 20 | ssize_t messageLength = packetLength; |
| 21 | 21 | ||
| 22 | Application* app = Application::getInstance(); | ||
| 23 | |||
| 22 | // check to see if the UI thread asked us to kill the voxel tree. since we're the only thread allowed to do that | 24 | // check to see if the UI thread asked us to kill the voxel tree. since we're the only thread allowed to do that |
| 23 | if (app->_wantToKillLocalVoxels) { | 25 | if (app->_wantToKillLocalVoxels) { |
| 24 | app->_voxels.killLocalVoxels(); | 26 | app->_voxels.killLocalVoxels(); |
| @@ -42,7 +44,7 @@ void VoxelPacketProcessor::processPacket(sockaddr& senderAddress, unsigned char* · 17 unmodified lines | |||
| 42 | } | 44 | } |
| 43 | } // fall through to piggyback message | 45 | } // fall through to piggyback message |
| 44 | 46 | ||
| 45 | if (app->_renderVoxels->isChecked()) { | 47 | if (Menu::getInstance()->isOptionChecked(MenuOption::Voxels)) { |
| 46 | Node* voxelServer = NodeList::getInstance()->nodeWithAddress(&senderAddress); | 48 | Node* voxelServer = NodeList::getInstance()->nodeWithAddress(&senderAddress); |
| 47 | if (voxelServer && socketMatch(voxelServer->getActiveSocket(), &senderAddress)) { | 49 | if (voxelServer && socketMatch(voxelServer->getActiveSocket(), &senderAddress)) { |
| 48 | voxelServer->lock(); | 50 | voxelServer->lock(); |