Automatically execute mapname.cfg at map load time. This allows different maps in mods to have different rendering settings (shadescale, etc). This is not currently suitable for standalone user maps as there's no functionality to reset such cvars back to default at the next map load (so, if using this in a mod, every map needs to have a cfg).

git-svn-id: https://svn.eduke32.com/eduke32@3706 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2013-04-25 17:48:37 +00:00
parent 15014234ab
commit 630261aa50

View file

@ -9862,6 +9862,20 @@ int32_t loadboard(char *filename, char flags, vec3_t *dapos, int16_t *daang, int
yax_updategrays(dapos->z);
#endif
{
char *p, fn[BMAX_PATH];
Bstrcpy(fn, filename);
p = Bstrrchr(fn, '.');
if (!p)
{
Bstrcat(fn, ".cfg");
OSD_Exec(fn);
}
}
return finish_loadboard(dapos, dacursectnum, numsprites, myflags);
}