# HG changeset patch # User Adam Kaminski # Date 1641573080 18000 # Fri Jan 07 11:31:20 2022 -0500 # Node ID 78d68e0f51fce1a3e731b6f75b8bf1e3f9d007c2 # Parent 0054042c390e03eb92824bc80a520d314e6e9cbb Fixed: the server wouldn't initialize compatflags and compatflags2 properly if entered as command line parameters. diff -r 0054042c390e -r 78d68e0f51fc src/c_cvars.cpp --- a/src/c_cvars.cpp Thu Jan 06 13:56:26 2022 -0500 +++ b/src/c_cvars.cpp Fri Jan 07 11:31:20 2022 -0500 @@ -1825,7 +1825,9 @@ // has read all ServerInfo CVars from its config file upon startup. if ((gamestate == GS_STARTUP) && (NETWORK_GetState() == NETSTATE_SERVER)) { - if ((Flags & (CVAR_SERVERINFO | CVAR_ARCHIVE)) == (CVAR_SERVERINFO | CVAR_ARCHIVE)) + // [AK] We'll also include compatflags and compatflags2, because compatmode is saved into + // the config file and screws with these two CVars during startup. + if ((Flags & (CVAR_SERVERINFO | CVAR_ARCHIVE)) == (CVAR_SERVERINFO | CVAR_ARCHIVE) || (this == &compatflags || this == &compatflags2)) { FLatchedValue saved; saved.Variable = this;