diff --git a/source/src/rendermodel.cpp b/source/src/rendermodel.cpp index 99ee4d25..6095119a 100644 --- a/source/src/rendermodel.cpp +++ b/source/src/rendermodel.cpp @@ -133,7 +133,6 @@ void mapmodelreset() { mapmodels.shrink(0); mapmodelchanged = 1; - flagmapconfigchange(); } } COMMAND(mapmodelreset, ""); diff --git a/source/src/texture.cpp b/source/src/texture.cpp index 97deef60..84700fdc 100644 --- a/source/src/texture.cpp +++ b/source/src/texture.cpp @@ -488,14 +488,7 @@ struct Slot vector slots; -COMMANDF(texturereset, "", () -{ - if(execcontext==IEXC_MAPCFG) - { - slots.setsize(0); - flagmapconfigchange(); - } -}); +COMMANDF(texturereset, "", () { if(execcontext==IEXC_MAPCFG) slots.setsize(0); }); void _texture(Slot &s, float *scale, char *name) { diff --git a/source/src/worldio.cpp b/source/src/worldio.cpp index 05a7c676..297fb982 100644 --- a/source/src/worldio.cpp +++ b/source/src/worldio.cpp @@ -405,8 +405,8 @@ void automapconfig() COMMAND(automapconfig, ""); void flagmapconfigchange() -{ - if(hdr.flags & MHF_AUTOMAPCONFIG) unsavededits++; +{ // if changes are tracked, because automapcfg is enabled and the change is not read from a config file -> set unsaved edits flag + if(execcontext != IEXC_MAPCFG && hdr.flags & MHF_AUTOMAPCONFIG) unsavededits++; } void getcurrentmapconfig(vector &f, bool onlysounds) @@ -785,7 +785,6 @@ bool load_world(char *mname) // still supports all map formats that have if(hdr.flags & MHF_AUTOMAPCONFIG) { // full featured embedded config: no need to read any other map config files copystring(lastloadedconfigfile, ""); - unsavededits = 0; } else { // map config from files