mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-07 07:21:10 +00:00
I don't know if this is actually better or not but it feels like it should be
git-svn-id: https://svn.eduke32.com/eduke32@6819 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
260fb278d9
commit
7d0249b9ee
1 changed files with 4 additions and 7 deletions
|
@ -1028,25 +1028,22 @@ perr:
|
||||||
|
|
||||||
void __fastcall Gv_GetManyVars(int const numVars, int32_t * const outBuf)
|
void __fastcall Gv_GetManyVars(int const numVars, int32_t * const outBuf)
|
||||||
{
|
{
|
||||||
for (bssize_t j = 0; j < numVars; ++j)
|
for (native_t j = 0; j < numVars; ++j)
|
||||||
{
|
{
|
||||||
int gameVar = *insptr++;
|
int gameVar = *insptr++;
|
||||||
|
int const invertResult = !!(gameVar & (MAXGAMEVARS << 1));
|
||||||
|
|
||||||
if (gameVar == MAXGAMEVARS)
|
if (gameVar == MAXGAMEVARS)
|
||||||
{
|
{
|
||||||
outBuf[j] = *insptr++;
|
outBuf[j] = *insptr++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
else if (gameVar == g_thisActorVarID)
|
||||||
if (gameVar == g_thisActorVarID)
|
|
||||||
{
|
{
|
||||||
outBuf[j] = vm.spriteNum;
|
outBuf[j] = vm.spriteNum;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
else if (gameVar >= g_gameVarCount && !invertResult)
|
||||||
int const invertResult = !!(gameVar & (MAXGAMEVARS << 1));
|
|
||||||
|
|
||||||
if (gameVar >= g_gameVarCount && !invertResult)
|
|
||||||
{
|
{
|
||||||
outBuf[j] = Gv_GetSpecialVarX(gameVar);
|
outBuf[j] = Gv_GetSpecialVarX(gameVar);
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue