diff --git a/voxel-server/src/VoxelServer.h b/voxel-server/src/VoxelServer.h index b258ee9406..326a926dbe 100644 --- a/voxel-server/src/VoxelServer.h +++ b/voxel-server/src/VoxelServer.h @@ -38,7 +38,6 @@ extern int PACKETS_PER_CLIENT_PER_INTERVAL; extern VoxelTree serverTree; // this IS a reaveraging tree extern bool wantVoxelPersist; extern bool wantLocalDomain; -extern bool wantColorRandomizer; extern bool debugVoxelSending; extern bool shouldShowAnimationDebug; extern bool displayVoxelStats; diff --git a/voxel-server/src/VoxelServerPacketProcessor.cpp b/voxel-server/src/VoxelServerPacketProcessor.cpp index de2848a7ac..4de08cadb5 100644 --- a/voxel-server/src/VoxelServerPacketProcessor.cpp +++ b/voxel-server/src/VoxelServerPacketProcessor.cpp @@ -47,28 +47,13 @@ void VoxelServerPacketProcessor::processPacket(sockaddr& senderAddress, unsigned int voxelDataSize = bytesRequiredForCodeLength(octets) + COLOR_SIZE_IN_BYTES; int voxelCodeSize = bytesRequiredForCodeLength(octets); - // color randomization on insert - int colorRandomizer = ::wantColorRandomizer ? randIntInRange (-50, 50) : 0; - int red = voxelData[voxelCodeSize + 0]; - int green = voxelData[voxelCodeSize + 1]; - int blue = voxelData[voxelCodeSize + 2]; - if (::shouldShowAnimationDebug) { - printf("insert voxels - wantColorRandomizer=%s old r=%d,g=%d,b=%d \n", - (::wantColorRandomizer?"yes":"no"),red,green,blue); - } - - red = std::max(0, std::min(255, red + colorRandomizer)); - green = std::max(0, std::min(255, green + colorRandomizer)); - blue = std::max(0, std::min(255, blue + colorRandomizer)); + int red = voxelData[voxelCodeSize + 0]; + int green = voxelData[voxelCodeSize + 1]; + int blue = voxelData[voxelCodeSize + 2]; - if (::shouldShowAnimationDebug) { - printf("insert voxels - wantColorRandomizer=%s NEW r=%d,g=%d,b=%d \n", - (::wantColorRandomizer?"yes":"no"),red,green,blue); + printf("insert voxels - r=%d,g=%d,b=%d \n", red, green, blue); } - voxelData[voxelCodeSize + 0] = red; - voxelData[voxelCodeSize + 1] = green; - voxelData[voxelCodeSize + 2] = blue; if (::shouldShowAnimationDebug) { float* vertices = firstVertexForCode(voxelData); diff --git a/voxel-server/src/main.cpp b/voxel-server/src/main.cpp index fc87f5973b..299a148f09 100644 --- a/voxel-server/src/main.cpp +++ b/voxel-server/src/main.cpp @@ -44,7 +44,6 @@ int PACKETS_PER_CLIENT_PER_INTERVAL = 10; VoxelTree serverTree(true); // this IS a reaveraging tree bool wantVoxelPersist = true; bool wantLocalDomain = false; -bool wantColorRandomizer = false; bool debugVoxelSending = false; bool shouldShowAnimationDebug = false; bool displayVoxelStats = false; @@ -475,10 +474,6 @@ int main(int argc, const char * argv[]) { ::shouldShowAnimationDebug = cmdOptionExists(argc, argv, WANT_ANIMATION_DEBUG); printf("shouldShowAnimationDebug=%s\n", debug::valueOf(::shouldShowAnimationDebug)); - const char* WANT_COLOR_RANDOMIZER = "--wantColorRandomizer"; - ::wantColorRandomizer = cmdOptionExists(argc, argv, WANT_COLOR_RANDOMIZER); - printf("wantColorRandomizer=%s\n", debug::valueOf(::wantColorRandomizer)); - // By default we will voxel persist, if you want to disable this, then pass in this parameter const char* NO_VOXEL_PERSIST = "--NoVoxelPersist"; if (cmdOptionExists(argc, argv, NO_VOXEL_PERSIST)) {