From a4032d234cd98551c806a3f990eba1038bbd0ca9 Mon Sep 17 00:00:00 2001 From: terminx Date: Wed, 8 Jul 2015 03:34:16 +0000 Subject: [PATCH] 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 --- polymer/eduke32/build/src/config.c | 10 ++++++++-- polymer/eduke32/source/common.c | 4 +++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/build/src/config.c b/polymer/eduke32/build/src/config.c index 315c6a25e..1c5aec9d7 100644 --- a/polymer/eduke32/build/src/config.c +++ b/polymer/eduke32/build/src/config.c @@ -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, diff --git a/polymer/eduke32/source/common.c b/polymer/eduke32/source/common.c index 266e7a081..7c091ed75 100644 --- a/polymer/eduke32/source/common.c +++ b/polymer/eduke32/source/common.c @@ -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