diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index a3bf82298..1a710ea48 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -3315,10 +3315,10 @@ int main(int argc, const char **argv) // ignore_convention pClient->InitInterfaces(); // execute config file - IOHANDLE file = pStorage->OpenFile(CONFIG_FILE, IOFLAG_READ, IStorage::TYPE_ALL); - if(file) + IOHANDLE File = pStorage->OpenFile(CONFIG_FILE, IOFLAG_READ, IStorage::TYPE_ALL); + if(File) { - io_close(file); + io_close(File); pConsole->ExecuteFile(CONFIG_FILE); } else // fallback @@ -3327,10 +3327,10 @@ int main(int argc, const char **argv) // ignore_convention } // execute autoexec file - file = pStorage->OpenFile(AUTOEXEC_CLIENT_FILE, IOFLAG_READ, IStorage::TYPE_ALL); - if(file) + File = pStorage->OpenFile(AUTOEXEC_CLIENT_FILE, IOFLAG_READ, IStorage::TYPE_ALL); + if(File) { - io_close(file); + io_close(File); pConsole->ExecuteFile(AUTOEXEC_CLIENT_FILE); } else // fallback @@ -3338,6 +3338,14 @@ int main(int argc, const char **argv) // ignore_convention pConsole->ExecuteFile(AUTOEXEC_FILE); } + if(g_Config.m_ClConfigVersion < 1) + { + g_Config.m_ClAntiPingPlayers = 1; + g_Config.m_ClAntiPingGrenade = 1; + g_Config.m_ClAntiPingWeapons = 1; + } + g_Config.m_ClConfigVersion = 1; + // parse the command line arguments if(argc > 1) // ignore_convention pConsole->ParseArguments(argc-1, &argv[1]); // ignore_convention diff --git a/src/engine/shared/config_variables.h b/src/engine/shared/config_variables.h index 55397e986..3e1d108a6 100644 --- a/src/engine/shared/config_variables.h +++ b/src/engine/shared/config_variables.h @@ -360,6 +360,7 @@ MACRO_CONFIG_INT(InpJoystick, inp_joystick, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT #else MACRO_CONFIG_INT(InpJoystick, inp_joystick, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Try to use a joystick as input") #endif +MACRO_CONFIG_INT(ClConfigVersion, cl_config_version, 0, 0, 0, CFGFLAG_CLIENT|CFGFLAG_SAVE, "The config version. Helps newer clients fix bugs with older configs.") // demo editor MACRO_CONFIG_INT(ClDemoSliceBegin, cl_demo_slice_begin, -1, 0, 0, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Begin marker for demo slice")