mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 22:51:50 +00:00
Rename Gv_GetSpecialVar() to Gv_GetArrayOrStruct() and fix what would be a bug in Gv_GetVarDataPtr() if we were using it for something more than the single thing we use it for now
git-svn-id: https://svn.eduke32.com/eduke32@7208 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
23308603c5
commit
fb15d84982
1 changed files with 3 additions and 3 deletions
|
@ -613,7 +613,7 @@ int __fastcall Gv_GetArrayValue(int const id, int index)
|
||||||
goto badindex; \
|
goto badindex; \
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __fastcall Gv_GetSpecialVar(int gameVar, int spriteNum, int const playerNum)
|
static int __fastcall Gv_GetArrayOrStruct(int gameVar, int spriteNum, int const playerNum)
|
||||||
{
|
{
|
||||||
int returnValue = gameVar;
|
int returnValue = gameVar;
|
||||||
|
|
||||||
|
@ -746,7 +746,7 @@ static FORCE_INLINE int __fastcall Gv_GetVar__(int &gameVar, int &spriteNum, int
|
||||||
else if (gameVar == GV_FLAG_CONSTANT)
|
else if (gameVar == GV_FLAG_CONSTANT)
|
||||||
returnValue = *insptr++;
|
returnValue = *insptr++;
|
||||||
else if ((gameVar & ~GV_FLAG_NEGATIVE) >= g_gameVarCount)
|
else if ((gameVar & ~GV_FLAG_NEGATIVE) >= g_gameVarCount)
|
||||||
returnValue = Gv_GetSpecialVar(gameVar, spriteNum, playerNum);
|
returnValue = Gv_GetArrayOrStruct(gameVar, spriteNum, playerNum);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int const invertResult = !!(gameVar & GV_FLAG_NEGATIVE);
|
int const invertResult = !!(gameVar & GV_FLAG_NEGATIVE);
|
||||||
|
@ -854,7 +854,7 @@ static intptr_t *Gv_GetVarDataPtr(const char *szGameLabel)
|
||||||
|
|
||||||
gamevar_t &var = aGameVars[gameVar];
|
gamevar_t &var = aGameVars[gameVar];
|
||||||
|
|
||||||
if (var.flags & (GAMEVAR_PERACTOR | GAMEVAR_PERPLAYER))
|
if (var.flags & (GAMEVAR_USER_MASK|GAMEVAR_PTR_MASK))
|
||||||
{
|
{
|
||||||
if (EDUKE32_PREDICT_FALSE(!var.pValues))
|
if (EDUKE32_PREDICT_FALSE(!var.pValues))
|
||||||
CON_ERRPRINTF("Gv_GetVarDataPtr(): INTERNAL ERROR: NULL array !!!\n");
|
CON_ERRPRINTF("Gv_GetVarDataPtr(): INTERNAL ERROR: NULL array !!!\n");
|
||||||
|
|
Loading…
Reference in a new issue