Added new variable for CONs:

numwalls
numsectors

There is a sufficient need for these variables because user may access uninitialized data if he/she uses MAXWALLS/MAXSECTOR. The numsprites is absent since the sprite array has gaps as the result of continual birth/dying/suiciding of sprites.

git-svn-id: https://svn.eduke32.com/eduke32@770 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hnt_ts 2008-06-05 20:07:34 +00:00
parent e84130c650
commit 72e0302353

View file

@ -1322,6 +1322,9 @@ static void AddSystemVars()
AddGameVar("display_mirror",(int)&display_mirror, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_CHARPTR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("randomseed",(int)&randomseed, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR);
AddGameVar("numwalls",(int)&numwalls, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_READONLY);
AddGameVar("numsectors",(int)&numsectors, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR | GAMEVAR_FLAG_READONLY);
}
void InitGameVars(void)
@ -1463,4 +1466,7 @@ static void ResetPointerVars(void)
aGameVars[GetGameID("display_mirror")].lValue = (intptr_t)&display_mirror;
aGameVars[GetGameID("randomseed")].lValue = (intptr_t)&randomseed;
aGameVars[GetGameID("numwalls")].lValue = (intptr_t)&numwalls;
aGameVars[GetGameID("numsectors")].lValue = (intptr_t)&numsectors;
}