don't accept voxel packet if rendering is turned off, correct boolean for kill

This commit is contained in:
Stephen Birarda 2013-07-15 17:08:55 -07:00
parent 38d8041bfb
commit 9f9d8e59bd

View file

@ -1245,7 +1245,7 @@ void Application::setRenderWarnings(bool renderWarnings) {
}
void Application::setRenderVoxels(bool voxelRender) {
if (voxelRender) {
if (!voxelRender) {
doKillLocalVoxels();
}
}
@ -3246,6 +3246,7 @@ void* Application::networkReceive(void* args) {
case PACKET_TYPE_Z_COMMAND:
case PACKET_TYPE_ERASE_VOXEL:
case PACKET_TYPE_ENVIRONMENT_DATA: {
if (app->_renderVoxels->isChecked()) {
Node* voxelServer = NodeList::getInstance()->soloNodeOfType(NODE_TYPE_VOXEL_SERVER);
if (voxelServer) {
voxelServer->lock();
@ -3258,6 +3259,7 @@ void* Application::networkReceive(void* args) {
voxelServer->unlock();
}
}
break;
}
case PACKET_TYPE_BULK_AVATAR_DATA: