diff --git a/polymer/eduke32/build/include/m32script.h b/polymer/eduke32/build/include/m32script.h index 4226ed7a3..1ebf6eb0f 100644 --- a/polymer/eduke32/build/include/m32script.h +++ b/polymer/eduke32/build/include/m32script.h @@ -111,7 +111,6 @@ enum GamevarFlags_t { GAMEVAR_USER_MASK = GAMEVAR_PERBLOCK, GAMEVAR_RESET = 0x00000008, // marks var for to default - GAMEVAR_DEFAULT = 0x00000100, // allow override GAMEVAR_SYSTEM = 0x00000800, // cannot change mode flags...(only default value) GAMEVAR_READONLY = 0x00001000, // values are read-only (no setvar allowed) diff --git a/polymer/eduke32/source/gamevars.c b/polymer/eduke32/source/gamevars.c index 8fb764ae5..ea83250ec 100644 --- a/polymer/eduke32/source/gamevars.c +++ b/polymer/eduke32/source/gamevars.c @@ -483,7 +483,7 @@ int32_t Gv_NewVar(const char *pszLabel, intptr_t lValue, uint32_t dwFlags) initprintf("%s:%d: warning: cannot redefine internal gamevar `%s'.\n",g_szScriptFileName,g_lineNumber,label+(g_numLabels<<6)); return 0; } - else if (!(aGameVars[i].dwFlags & GAMEVAR_DEFAULT) && !(aGameVars[i].dwFlags & GAMEVAR_SYSTEM)) + else if (!(aGameVars[i].dwFlags & GAMEVAR_SYSTEM)) { // it's a duplicate in error g_numCompilerWarnings++; diff --git a/polymer/eduke32/source/gamevars.h b/polymer/eduke32/source/gamevars.h index a7ecb56e4..d1ae6d80b 100644 --- a/polymer/eduke32/source/gamevars.h +++ b/polymer/eduke32/source/gamevars.h @@ -33,8 +33,8 @@ enum GamevarFlags_t { GAMEVAR_PERPLAYER = 0x00000001, // per-player variable GAMEVAR_PERACTOR = 0x00000002, // per-actor variable GAMEVAR_USER_MASK = (GAMEVAR_PERPLAYER|GAMEVAR_PERACTOR), - GAMEVAR_RESET = 0x00000008, // marks var for to default - GAMEVAR_DEFAULT = 0x00000100, // allow override + GAMEVAR_RESET = 0x00000008, // INTERNAL, don't use + GAMEVAR_DEFAULT = 0x00000100, // UNUSED, but always cleared for user-defined gamevars GAMEVAR_SECRET = 0x00000200, // don't dump... GAMEVAR_NODEFAULT = 0x00000400, // don't reset on actor spawn GAMEVAR_SYSTEM = 0x00000800, // cannot change mode flags...(only default value) diff --git a/polymer/eduke32/source/m32def.c b/polymer/eduke32/source/m32def.c index ccf9cc48e..35b9ea8a8 100644 --- a/polymer/eduke32/source/m32def.c +++ b/polymer/eduke32/source/m32def.c @@ -2535,7 +2535,7 @@ repeatcase: // global var: can't define default if (g_numCompilerErrors==0) { - Gv_NewVar(tlabel, *(g_scriptPtr-2), *(g_scriptPtr-1) & ~GAMEVAR_DEFAULT); + Gv_NewVar(tlabel, *(g_scriptPtr-2), *(g_scriptPtr-1)); g_scriptPtr -= 2; // no need to save in script... } } diff --git a/polymer/eduke32/source/m32vars.c b/polymer/eduke32/source/m32vars.c index c62466239..4e88e7b9b 100644 --- a/polymer/eduke32/source/m32vars.c +++ b/polymer/eduke32/source/m32vars.c @@ -166,7 +166,7 @@ int32_t Gv_NewVar(const char *pszLabel, intptr_t lValue, uint32_t dwFlags) initprintf("%s:%d: warning: cannot redefine internal gamevar `%s'.\n",g_szScriptFileName,g_lineNumber,label+(g_numLabels<<6)); return 0; } - else if (!(aGameVars[i].dwFlags & GAMEVAR_DEFAULT) && !(aGameVars[i].dwFlags & GAMEVAR_SYSTEM)) + else if (!(aGameVars[i].dwFlags & GAMEVAR_SYSTEM)) { // it's a duplicate in error // g_numCompilerWarnings++;