Write configs before changing the mod.

Otherwise config changes will be lost if the mod is changed.

Part of #630.
This commit is contained in:
Yamagi 2020-12-02 08:57:46 +01:00
parent a66b858f9c
commit e86a678a3b

View file

@ -1669,6 +1669,8 @@ void FS_BuildGenericSearchPath(void) {
Sys_Mkdir(path);
}
void CL_WriteConfiguration(void);
void
FS_BuildGameSpecificSearchPath(char *dir)
{
@ -1680,6 +1682,12 @@ FS_BuildGameSpecificSearchPath(char *dir)
fsRawPath_t *search;
fsSearchPath_t *next;
#ifndef DEDICATED_ONLY
// Write the config. Otherwise changes made by the
// current mod are lost.
CL_WriteConfiguration();
#endif
// empty string means baseq2
if(dir[0] == '\0')
{