Merge pull request #889 from EmosewaMC/MoreImprovements

Continued improvements to Servers
This commit is contained in:
Gie "Max" Vanommeslaeghe
2022-12-20 23:11:24 +01:00
committed by GitHub
9 changed files with 218 additions and 150 deletions

View File

@@ -6,15 +6,25 @@
#include <cstdint>
#include <string>
#include <set>
#include "../thirdparty/raknet/Source/BitStream.h"
#include "BitStream.h"
#pragma warning (disable:4251) //Disables SQL warnings
typedef int RESTICKET;
const int highFrameRate = 16; //60fps
const int mediumFramerate = 33; //30fps
const int lowFramerate = 66; //15fps
// These are the same define, but they mean two different things in different contexts
// so a different define to distinguish what calculation is happening will help clarity.
#define FRAMES_TO_MS(x) 1000 / x
#define MS_TO_FRAMES(x) 1000 / x
//=========== FRAME TIMINGS ===========
constexpr uint32_t highFramerate = 60;
constexpr uint32_t mediumFramerate = 30;
constexpr uint32_t lowFramerate = 15;
constexpr uint32_t highFrameDelta = FRAMES_TO_MS(highFramerate);
constexpr uint32_t mediumFrameDelta = FRAMES_TO_MS(mediumFramerate);
constexpr uint32_t lowFrameDelta = FRAMES_TO_MS(lowFramerate);
//========== MACROS ===========