Fix a bug where the editor was forced into game filesystem mode by default, and add a preference to mapster32.cfg to control the default filesystem mode.

git-svn-id: https://svn.eduke32.com/eduke32@5274 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2015-07-08 03:34:16 +00:00
parent bd427182db
commit a4032d234c
2 changed files with 11 additions and 3 deletions

View file

@ -5,7 +5,7 @@
#include "build.h"
#include "editor.h"
#include "osd.h"
#include "cache1d.h"
#include "baselayer.h"
#include "renderlayer.h"
@ -219,6 +219,9 @@ int32_t loadsetup(const char *fn)
if (readconfig(fp, "showambiencesounds", val, VL) > 0)
showambiencesounds = clamp(atoi_safe(val), 0, 2);
if (readconfig(fp, "pathsearchmode", val, VL) > 0)
pathsearchmode = clamp(atoi_safe(val), 0, 1);
if (readconfig(fp, "autogray", val, VL) > 0)
autogray = !!atoi_safe(val);
// if (readconfig(fp, "showinnergray", val, VL) > 0)
@ -485,6 +488,9 @@ int32_t writesetup(const char *fn)
"; Ambience sound circles (0:none, 1:only in current sector, 2:all)\n"
"showambiencesounds = %d\n"
"\n"
"; Default filesystem mode\n"
"pathsearchmode = %d\n"
"\n"
"; TROR: Automatic grayout of plain (non-extended) sectors,\n"
"; toggled with Ctrl-A:\n"
"autogray = %d\n"
@ -597,7 +603,7 @@ int32_t writesetup(const char *fn)
sideview_reversehrot,
revertCTRL,scrollamount,pk_turnaccel,pk_turndecel,autosave,autocorruptcheck,
corruptcheck_noalreadyrefd, fixmaponsave_sprites, keeptexturestretch,
showheightindicators,showambiencesounds,
showheightindicators,showambiencesounds,pathsearchmode,
autogray, //showinnergray,
graphicsmode,
MixRate,AmbienceToggle,ParentalLock, !!m32_osd_tryscript,

View file

@ -478,7 +478,9 @@ void G_LoadGroups(int32_t autoload)
struct strllist *s;
int const bakpathsearchmode = pathsearchmode;
pathsearchmode = 1;
while (CommandGrps)
{
int32_t j;
@ -499,7 +501,7 @@ void G_LoadGroups(int32_t autoload)
Bfree(CommandGrps);
CommandGrps = s;
}
pathsearchmode = 0;
pathsearchmode = bakpathsearchmode;
}
#ifdef _WIN32