mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 13:50:35 +02:00
tweaks and cleanup
This commit is contained in:
parent
ae5d5324c1
commit
29522d1e50
2 changed files with 3 additions and 5 deletions
|
@ -13,8 +13,6 @@
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include "VoxelSendThread.h"
|
#include "VoxelSendThread.h"
|
||||||
|
|
||||||
const int UNCOMPRESSED_SIZE_MULTIPLE = 20;
|
|
||||||
|
|
||||||
VoxelNodeData::VoxelNodeData(Node* owningNode) :
|
VoxelNodeData::VoxelNodeData(Node* owningNode) :
|
||||||
VoxelQuery(owningNode),
|
VoxelQuery(owningNode),
|
||||||
_viewSent(false),
|
_viewSent(false),
|
||||||
|
@ -47,7 +45,7 @@ void VoxelNodeData::initializeVoxelSendThread(VoxelServer* voxelServer) {
|
||||||
_voxelSendThread->initialize(true);
|
_voxelSendThread->initialize(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool VoxelNodeData::packetIsDuplicate() {
|
bool VoxelNodeData::packetIsDuplicate() const {
|
||||||
if (_lastVoxelPacketLength == getPacketLength()) {
|
if (_lastVoxelPacketLength == getPacketLength()) {
|
||||||
return memcmp(_lastVoxelPacket, getPacket(), getPacketLength()) == 0;
|
return memcmp(_lastVoxelPacket, getPacket(), getPacketLength()) == 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,10 +36,10 @@ public:
|
||||||
|
|
||||||
bool isPacketWaiting() const { return _voxelPacketWaiting; }
|
bool isPacketWaiting() const { return _voxelPacketWaiting; }
|
||||||
|
|
||||||
bool packetIsDuplicate();
|
bool packetIsDuplicate() const;
|
||||||
bool shouldSuppressDuplicatePacket();
|
bool shouldSuppressDuplicatePacket();
|
||||||
|
|
||||||
int getAvailable() const { return MAX_VOXEL_PACKET_SIZE - getPacketLength(); }
|
int getAvailable() const { return _voxelPacketAvailableBytes; }
|
||||||
int getMaxSearchLevel() const { return _maxSearchLevel; };
|
int getMaxSearchLevel() const { return _maxSearchLevel; };
|
||||||
void resetMaxSearchLevel() { _maxSearchLevel = 1; };
|
void resetMaxSearchLevel() { _maxSearchLevel = 1; };
|
||||||
void incrementMaxSearchLevel() { _maxSearchLevel++; };
|
void incrementMaxSearchLevel() { _maxSearchLevel++; };
|
||||||
|
|
Loading…
Reference in a new issue