CON/m32script: remove GAMEVAR_DEFAULT uses, since they had no effect.

In CON, the bit is still always cleared for user-defined gamevars.

git-svn-id: https://svn.eduke32.com/eduke32@3417 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2013-01-20 21:17:15 +00:00
parent 99fd67211d
commit 9103d4987c
5 changed files with 5 additions and 6 deletions

View File

@ -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)

View File

@ -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++;

View File

@ -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)

View File

@ -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...
}
}

View File

@ -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++;