feat: upgrade session keys to use mersenne twister (#1155)

* upgrade session keys to use mersenne twister

* arithmetic type static assert and windows min/max macro undef
This commit is contained in:
avery
2023-07-23 14:59:43 -07:00
committed by GitHub
parent c791d1a237
commit bd5ead40f6
3 changed files with 43 additions and 24 deletions

View File

@@ -29,6 +29,7 @@ namespace Game {
dServer* server = nullptr;
dConfig* config = nullptr;
bool shouldShutdown = false;
std::mt19937 randomEngine;
}
dLogger* SetupLogger();
@@ -83,6 +84,8 @@ int main(int argc, char** argv) {
delete res;
delete stmt;
Game::randomEngine = std::mt19937(time(0));
//It's safe to pass 'localhost' here, as the IP is only used as the external IP.
uint32_t maxClients = 50;
uint32_t ourPort = 1001; //LU client is hardcoded to use this for auth port, so I'm making it the default.