mirror of
https://github.com/overte-org/overte.git
synced 2025-07-10 18:58:37 +02:00
Merge pull request #798 from ZappoMan/multiple_voxel_servers
fixed packets per second command line with new frame rate
This commit is contained in:
commit
179c2324f8
1 changed files with 2 additions and 1 deletions
|
@ -49,6 +49,7 @@ const float MAX_CUBE = 0.05f;
|
||||||
const int VOXEL_SEND_INTERVAL_USECS = 17 * 1000; // approximately 60fps
|
const int VOXEL_SEND_INTERVAL_USECS = 17 * 1000; // approximately 60fps
|
||||||
int PACKETS_PER_CLIENT_PER_INTERVAL = 20;
|
int PACKETS_PER_CLIENT_PER_INTERVAL = 20;
|
||||||
const int SENDING_TIME_TO_SPARE = 5 * 1000; // usec of sending interval to spare for calculating voxels
|
const int SENDING_TIME_TO_SPARE = 5 * 1000; // usec of sending interval to spare for calculating voxels
|
||||||
|
const int INTERVALS_PER_SECOND = 1000 * 1000 / VOXEL_SEND_INTERVAL_USECS;
|
||||||
|
|
||||||
const int MAX_VOXEL_TREE_DEPTH_LEVELS = 4;
|
const int MAX_VOXEL_TREE_DEPTH_LEVELS = 4;
|
||||||
|
|
||||||
|
@ -572,7 +573,7 @@ int main(int argc, const char * argv[]) {
|
||||||
const char* PACKETS_PER_SECOND = "--packetsPerSecond";
|
const char* PACKETS_PER_SECOND = "--packetsPerSecond";
|
||||||
const char* packetsPerSecond = getCmdOption(argc, argv, PACKETS_PER_SECOND);
|
const char* packetsPerSecond = getCmdOption(argc, argv, PACKETS_PER_SECOND);
|
||||||
if (packetsPerSecond) {
|
if (packetsPerSecond) {
|
||||||
PACKETS_PER_CLIENT_PER_INTERVAL = atoi(packetsPerSecond)/10;
|
PACKETS_PER_CLIENT_PER_INTERVAL = atoi(packetsPerSecond)/INTERVALS_PER_SECOND;
|
||||||
if (PACKETS_PER_CLIENT_PER_INTERVAL < 1) {
|
if (PACKETS_PER_CLIENT_PER_INTERVAL < 1) {
|
||||||
PACKETS_PER_CLIENT_PER_INTERVAL = 1;
|
PACKETS_PER_CLIENT_PER_INTERVAL = 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue