mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 14:44:39 +02:00
clean up server name
This commit is contained in:
parent
b3e9d369e4
commit
d9e60f502c
3 changed files with 13 additions and 17 deletions
|
@ -12,6 +12,9 @@
|
|||
#include "VoxelServerConsts.h"
|
||||
#include "VoxelNodeData.h"
|
||||
|
||||
const char* VOXEL_SERVER_NAME = "Voxel";
|
||||
const char* VOXEL_SERVER_LOGGING_TARGET_NAME = "voxel-server";
|
||||
const char* LOCAL_VOXELS_PERSIST_FILE = "resources/voxels.svo";
|
||||
|
||||
VoxelServer::VoxelServer(const unsigned char* dataBuffer, int numBytes) : OctreeServer(dataBuffer, numBytes) {
|
||||
// nothing special to do here...
|
||||
|
@ -29,20 +32,6 @@ Octree* VoxelServer::createTree() {
|
|||
return new VoxelTree(true);
|
||||
}
|
||||
|
||||
unsigned char VoxelServer::getMyNodeType() {
|
||||
return NODE_TYPE_VOXEL_SERVER;
|
||||
}
|
||||
|
||||
const char* VOXEL_SERVER_LOGGING_TARGET_NAME = "voxel-server";
|
||||
const char* VoxelServer::getMyLoggingServerTargetName() {
|
||||
return VOXEL_SERVER_LOGGING_TARGET_NAME;
|
||||
}
|
||||
|
||||
const char* LOCAL_VOXELS_PERSIST_FILE = "resources/voxels.svo";
|
||||
const char* VoxelServer::getMyDefaultPersistFilename() {
|
||||
return LOCAL_VOXELS_PERSIST_FILE;
|
||||
}
|
||||
|
||||
bool VoxelServer::hasSpecialPacketToSend() {
|
||||
bool shouldSendEnvironments = _sendEnvironments && shouldDo(ENVIRONMENT_SEND_INTERVAL_USECS, OCTREE_SEND_INTERVAL_USECS);
|
||||
return shouldSendEnvironments;
|
||||
|
|
|
@ -37,9 +37,12 @@ public:
|
|||
// Subclasses must implement these methods
|
||||
virtual OctreeQueryNode* createOctreeQueryNode(Node* newNode);
|
||||
virtual Octree* createTree();
|
||||
virtual unsigned char getMyNodeType();
|
||||
virtual const char* getMyLoggingServerTargetName();
|
||||
virtual const char* getMyDefaultPersistFilename();
|
||||
virtual unsigned char getMyNodeType() const { return NODE_TYPE_VOXEL_SERVER; }
|
||||
virtual PACKET_TYPE getMyQueryMessageType() const { return PACKET_TYPE_VOXEL_QUERY; }
|
||||
virtual const char* getMyServerName() const { return VOXEL_SERVER_NAME; }
|
||||
virtual const char* getMyLoggingServerTargetName() const { return VOXEL_SERVER_LOGGING_TARGET_NAME; }
|
||||
virtual const char* getMyDefaultPersistFilename() const { return LOCAL_VOXELS_PERSIST_FILE; }
|
||||
|
||||
virtual bool hasSpecialPacketToSend();
|
||||
virtual int sendSpecialPacket(Node* node);
|
||||
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
#ifndef __voxel_server__VoxelServerConsts__
|
||||
#define __voxel_server__VoxelServerConsts__
|
||||
|
||||
extern const char* VOXEL_SERVER_NAME;
|
||||
extern const char* VOXEL_SERVER_LOGGING_TARGET_NAME;
|
||||
extern const char* LOCAL_VOXELS_PERSIST_FILE;
|
||||
|
||||
const int ENVIRONMENT_SEND_INTERVAL_USECS = 1000000;
|
||||
|
||||
#endif // __voxel_server__VoxelServerConsts__
|
||||
|
|
Loading…
Reference in a new issue