Resolve warnings, change config init order and remove unused Game variables for all servers (#877)

* Resolve warnings and change init order

Initialize dConfig first, before logger so we know whether or not to log to console
Initialize namespace Game variables to nullptr so they are a known value if accessed before initialization.
Removed unused Game variables
Replaced config with a pointer instead of referencing something on the stack.
Assign return values to system calls to silence warnings.

Tested that the server still compiles, runs and allows me to load into the game.

* Only start Master of config files exist

Also default the logging to console to on on the off chance the files exist but are wrong / corrupted.
This commit is contained in:
David Markowitz
2022-12-15 06:13:49 -08:00
committed by GitHub
parent 5292f36417
commit b7341c8106
7 changed files with 117 additions and 104 deletions

View File

@@ -4,7 +4,6 @@ namespace Game {
dLogger* logger;
dServer* server;
dZoneManager* zoneManager;
dpWorld* physicsWorld;
dChatFilter* chatFilter;
dConfig* config;
std::mt19937 randomEngine;