prevent G_ReadOptions() overriding netgame settings (#2163)

* prevent G_ReadOptions() overriding netgame settings

* reorder commands

Co-Authored-By: Roman Fomin <rfomin@gmail.com>

---------

Co-authored-by: Roman Fomin <rfomin@gmail.com>
This commit is contained in:
Fabian Greffrath 2025-01-28 13:35:20 +01:00 committed by GitHub
parent 12bd1fed68
commit 1ab18dcff4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -98,18 +98,6 @@ static void LoadGameSettings(net_gamesettings_t *settings)
{ {
unsigned int i; unsigned int i;
deathmatch = settings->deathmatch;
startepisode = settings->episode;
startmap = settings->map;
startskill = settings->skill;
startloadgame = settings->loadgame;
lowres_turn = settings->lowres_turn;
nomonsters = settings->nomonsters;
fastparm = settings->fast_monsters;
respawnparm = settings->respawn_monsters;
timelimit = settings->timelimit;
consoleplayer = settings->consoleplayer;
if (lowres_turn) if (lowres_turn)
{ {
I_Printf(VB_WARNING, "NOTE: Turning resolution is reduced; this is probably " I_Printf(VB_WARNING, "NOTE: Turning resolution is reduced; this is probably "
@ -141,6 +129,18 @@ static void LoadGameSettings(net_gamesettings_t *settings)
{ {
G_ReadOptions(settings->options); G_ReadOptions(settings->options);
} }
deathmatch = settings->deathmatch;
startepisode = settings->episode;
startmap = settings->map;
startskill = settings->skill;
startloadgame = settings->loadgame;
lowres_turn = settings->lowres_turn;
nomonsters = settings->nomonsters;
fastparm = settings->fast_monsters;
respawnparm = settings->respawn_monsters;
timelimit = settings->timelimit;
consoleplayer = settings->consoleplayer;
} }
// Save the game settings from global variables to the specified // Save the game settings from global variables to the specified