mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 14:04:23 +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 "VoxelServerConsts.h"
|
||||||
#include "VoxelNodeData.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) {
|
VoxelServer::VoxelServer(const unsigned char* dataBuffer, int numBytes) : OctreeServer(dataBuffer, numBytes) {
|
||||||
// nothing special to do here...
|
// nothing special to do here...
|
||||||
|
@ -29,20 +32,6 @@ Octree* VoxelServer::createTree() {
|
||||||
return new VoxelTree(true);
|
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 VoxelServer::hasSpecialPacketToSend() {
|
||||||
bool shouldSendEnvironments = _sendEnvironments && shouldDo(ENVIRONMENT_SEND_INTERVAL_USECS, OCTREE_SEND_INTERVAL_USECS);
|
bool shouldSendEnvironments = _sendEnvironments && shouldDo(ENVIRONMENT_SEND_INTERVAL_USECS, OCTREE_SEND_INTERVAL_USECS);
|
||||||
return shouldSendEnvironments;
|
return shouldSendEnvironments;
|
||||||
|
|
|
@ -37,9 +37,12 @@ public:
|
||||||
// Subclasses must implement these methods
|
// Subclasses must implement these methods
|
||||||
virtual OctreeQueryNode* createOctreeQueryNode(Node* newNode);
|
virtual OctreeQueryNode* createOctreeQueryNode(Node* newNode);
|
||||||
virtual Octree* createTree();
|
virtual Octree* createTree();
|
||||||
virtual unsigned char getMyNodeType();
|
virtual unsigned char getMyNodeType() const { return NODE_TYPE_VOXEL_SERVER; }
|
||||||
virtual const char* getMyLoggingServerTargetName();
|
virtual PACKET_TYPE getMyQueryMessageType() const { return PACKET_TYPE_VOXEL_QUERY; }
|
||||||
virtual const char* getMyDefaultPersistFilename();
|
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 bool hasSpecialPacketToSend();
|
||||||
virtual int sendSpecialPacket(Node* node);
|
virtual int sendSpecialPacket(Node* node);
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,10 @@
|
||||||
#ifndef __voxel_server__VoxelServerConsts__
|
#ifndef __voxel_server__VoxelServerConsts__
|
||||||
#define __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;
|
const int ENVIRONMENT_SEND_INTERVAL_USECS = 1000000;
|
||||||
|
|
||||||
#endif // __voxel_server__VoxelServerConsts__
|
#endif // __voxel_server__VoxelServerConsts__
|
||||||
|
|
Loading…
Reference in a new issue