diff --git a/assignment-client/src/voxels/VoxelScriptingInterface.h b/assignment-client/src/voxels/VoxelScriptingInterface.h index 79fde44866..4a6ca91039 100644 --- a/assignment-client/src/voxels/VoxelScriptingInterface.h +++ b/assignment-client/src/voxels/VoxelScriptingInterface.h @@ -50,6 +50,12 @@ public slots: /// \param scale the scale of the voxel (in VS space) void queueVoxelDelete(float x, float y, float z, float scale); + /// set the max packets per second send rate + void setPacketsPerSecond(int packetsPerSecond) { return _voxelPacketSender.setPacketsPerSecond(packetsPerSecond); } + + /// get the max packets per second send rate + int getPacketsPerSecond() const { return _voxelPacketSender.getPacketsPerSecond(); } + /// does a voxel server exist to send to bool voxelServersExist() const { return _voxelPacketSender.voxelServersExist(); } diff --git a/libraries/shared/src/PacketSender.h b/libraries/shared/src/PacketSender.h index 6ca6e19be2..1731f70cbf 100644 --- a/libraries/shared/src/PacketSender.h +++ b/libraries/shared/src/PacketSender.h @@ -44,12 +44,8 @@ public: /// \thread any thread, typically the application thread void queuePacketForSending(sockaddr& address, unsigned char* packetData, ssize_t packetLength); - void setPacketsPerSecond(int packetsPerSecond) { - _packetsPerSecond = std::max(MINIMUM_PACKETS_PER_SECOND, packetsPerSecond); - if (!isThreaded()) { - printf("setPacketsPerSecond()... this=%p _packetsPerSecond=%d\n", this, _packetsPerSecond); - } - } + void setPacketsPerSecond(int packetsPerSecond) + { _packetsPerSecond = std::max(MINIMUM_PACKETS_PER_SECOND, packetsPerSecond); } int getPacketsPerSecond() const { return _packetsPerSecond; } void setPacketSenderNotify(PacketSenderNotify* notify) { _notify = notify; }