engine: server: move master announce logic to masterlist, keep unique heartbeat challenge and heartbeat timer for each master

This commit is contained in:
Alibek Omarov
2023-04-03 00:57:47 +03:00
parent 93a7ccd14f
commit 01e0542223
7 changed files with 195 additions and 117 deletions
+1 -2
View File
@@ -374,9 +374,7 @@ typedef struct
entity_state_t *baselines; // [GI->max_edicts]
entity_state_t *static_entities; // [MAX_STATIC_ENTITIES];
double last_heartbeat;
challenge_t challenges[MAX_CHALLENGES]; // to prevent invalid IPs from connecting
uint heartbeat_challenge;
} server_static_t;
//=============================================================================
@@ -444,6 +442,7 @@ extern convar_t skill;
extern convar_t coop;
extern convar_t sv_cheats;
extern convar_t public_server;
extern convar_t sv_nat;
extern convar_t *sv_pausable; // allows pause in multiplayer
extern convar_t *sv_check_errors;