mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
fixed bug that crashes the server if settings tunings in the server config
This commit is contained in:
parent
123c5b5b99
commit
70dea7e398
|
@ -10,6 +10,7 @@ GAMECONTEXT::GAMECONTEXT()
|
||||||
for(int i = 0; i < MAX_CLIENTS; i++)
|
for(int i = 0; i < MAX_CLIENTS; i++)
|
||||||
players[i] = 0;
|
players[i] = 0;
|
||||||
|
|
||||||
|
controller = 0;
|
||||||
vote_closetime = 0;
|
vote_closetime = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,10 @@ TUNING_PARAMS tuning;
|
||||||
|
|
||||||
static void check_pure_tuning()
|
static void check_pure_tuning()
|
||||||
{
|
{
|
||||||
|
// might not be created yet during start up
|
||||||
|
if(!game.controller)
|
||||||
|
return;
|
||||||
|
|
||||||
if( strcmp(game.controller->gametype, "DM")==0 ||
|
if( strcmp(game.controller->gametype, "DM")==0 ||
|
||||||
strcmp(game.controller->gametype, "TDM")==0 ||
|
strcmp(game.controller->gametype, "TDM")==0 ||
|
||||||
strcmp(game.controller->gametype, "CTF")==0)
|
strcmp(game.controller->gametype, "CTF")==0)
|
||||||
|
|
Loading…
Reference in a new issue