mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- deleted several unused local variables
None of the initializers here is modifying gamestate, this looks like overcautious preservation for demo compatibility.
This commit is contained in:
parent
3a7b23f655
commit
84e54e4fdb
14 changed files with 3 additions and 45 deletions
|
@ -5637,7 +5637,6 @@ void actProcessSprites(void)
|
|||
if ((hit&0xc000) != 0xc000 && (nObject < 0 || nObject >= 4096))
|
||||
break;
|
||||
dassert(nObject >= 0 && nObject < kMaxSprites);
|
||||
int UNUSED(nOwner) = actSpriteOwnerToSpriteId(pSprite);
|
||||
actExplodeSprite(pSprite);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -137,7 +137,6 @@ bool CanMove(spritetype *pSprite, int a2, int nAngle, int nRange)
|
|||
if (!FindSector(x, y, z, &nSector))
|
||||
return false;
|
||||
int floorZ = getflorzofslope(nSector, x, y);
|
||||
int UNUSED(ceilZ) = getceilzofslope(nSector, x, y);
|
||||
int nXSector = sector[nSector].extra;
|
||||
char Underwater = 0; char Water = 0; char Depth = 0; char Crusher = 0;
|
||||
XSECTOR* pXSector = NULL;
|
||||
|
@ -239,7 +238,6 @@ void aiChooseDirection(spritetype *pSprite, XSPRITE *pXSprite, int a3)
|
|||
int dx = xvel[nSprite];
|
||||
int dy = yvel[nSprite];
|
||||
int t1 = dmulscale30(dx, nCos, dy, nSin);
|
||||
int UNUSED(t2) = dmulscale30(dx, nSin, -dy, nCos);
|
||||
int vsi = ((t1*15)>>12) / 2;
|
||||
int v8 = 341;
|
||||
if (vc < 0)
|
||||
|
@ -1431,7 +1429,6 @@ void sub_5F15C(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite2->type);
|
||||
if (nDist > pDudeInfo->seeDist && nDist > pDudeInfo->hearDist)
|
||||
continue;
|
||||
int UNUSED(nAngle) = getangle(dx,dy);
|
||||
aiSetTarget(pXSprite, pSprite2->index);
|
||||
aiActivateDude(pSprite, pXSprite);
|
||||
return;
|
||||
|
|
|
@ -340,7 +340,6 @@ static void MoveForward(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
pSprite->ang = (pSprite->ang+256)&2047;
|
||||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
if ((unsigned int)Random(64) < 32 && nDist <= 0x200)
|
||||
return;
|
||||
|
@ -374,7 +373,6 @@ static void MoveSwoop(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
}
|
||||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
if (Chance(0x600) && nDist <= 0x200)
|
||||
return;
|
||||
|
@ -406,7 +404,6 @@ static void MoveFly(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
}
|
||||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
if (Chance(0x4000) && nDist <= 0x200)
|
||||
return;
|
||||
|
|
|
@ -440,7 +440,6 @@ static void thinkSwimChase(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
if (nDist < pDudeInfo->seeDist && klabs(nDeltaAngle) <= pDudeInfo->periphery)
|
||||
{
|
||||
aiSetTarget(pXSprite, pXSprite->target);
|
||||
int UNUSED(floorZ) = getflorzofslope(pSprite->sectnum, pSprite->x, pSprite->y);
|
||||
if (nDist < 0x400 && klabs(nDeltaAngle) < 85)
|
||||
aiNewState(pSprite, pXSprite, &beastSwimSlash);
|
||||
else
|
||||
|
@ -470,7 +469,6 @@ static void MoveForward(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
return;
|
||||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= 0x400 && Random(64) < 32)
|
||||
return;
|
||||
|
@ -493,7 +491,6 @@ static void sub_628A0(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
pSprite->ang = (pSprite->ang+256)&2047;
|
||||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
if (Random(64) < 32 && nDist <= 0x400)
|
||||
return;
|
||||
|
@ -531,7 +528,6 @@ static void sub_62AE0(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int dz = z2 - z;
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
if (Chance(0x600) && nDist <= 0x400)
|
||||
return;
|
||||
|
@ -567,7 +563,6 @@ static void sub_62D7C(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int dz = (z2 - z)<<3;
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
if (Chance(0x4000) && nDist <= 0x400)
|
||||
return;
|
||||
|
|
|
@ -351,7 +351,6 @@ static void MoveForward(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
pSprite->ang = (pSprite->ang+256)&2047;
|
||||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= 0x399)
|
||||
return;
|
||||
|
@ -382,7 +381,6 @@ static void MoveSwoop(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
return;
|
||||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
if (Chance(0x8000) && nDist <= 0x399)
|
||||
return;
|
||||
|
@ -411,7 +409,6 @@ static void MoveAscend(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
return;
|
||||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
if (Chance(0x4000) && nDist <= 0x399)
|
||||
return;
|
||||
|
|
|
@ -307,7 +307,6 @@ static void thinkSwimChase(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
if (nDist < pDudeInfo->seeDist && klabs(nDeltaAngle) <= pDudeInfo->periphery)
|
||||
{
|
||||
aiSetTarget(pXSprite, pXSprite->target);
|
||||
int UNUSED(floorZ) = getflorzofslope(pSprite->sectnum, pSprite->x, pSprite->y);
|
||||
if (nDist < 0x400 && klabs(nDeltaAngle) < 85)
|
||||
aiNewState(pSprite, pXSprite, &tinycalebSwimAttack);
|
||||
else
|
||||
|
@ -335,7 +334,6 @@ static void sub_65D04(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
pSprite->ang = (pSprite->ang+256)&2047;
|
||||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
if (Random(64) < 32 && nDist <= 0x400)
|
||||
return;
|
||||
|
@ -373,7 +371,6 @@ static void sub_65F44(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int dz = z2 - z;
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
if (Chance(0x600) && nDist <= 0x400)
|
||||
return;
|
||||
|
@ -409,7 +406,6 @@ static void sub_661E0(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int dz = (z2 - z)<<3;
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
if (Chance(0x4000) && nDist <= 0x400)
|
||||
return;
|
||||
|
|
|
@ -138,8 +138,6 @@ static void BlastSSeqCallback(int, int nXSprite)
|
|||
int height = (pSprite->yrepeat*getDudeInfo(pSprite->type)->eyeHeight) << 2;
|
||||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int UNUSED(nDist) = approxDist(dx, dy);
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int x = pSprite->x;
|
||||
int y = pSprite->y;
|
||||
int z = height;
|
||||
|
@ -583,7 +581,6 @@ static void MoveForward(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
pSprite->ang = (pSprite->ang+256)&2047;
|
||||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
if ((unsigned int)Random(64) < 32 && nDist <= 0x400)
|
||||
return;
|
||||
|
@ -621,7 +618,6 @@ static void MoveSlow(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
}
|
||||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
if (Chance(0x600) && nDist <= 0x400)
|
||||
return;
|
||||
|
@ -665,7 +661,6 @@ static void MoveSwoop(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
}
|
||||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
if (Chance(0x600) && nDist <= 0x400)
|
||||
return;
|
||||
|
@ -708,7 +703,6 @@ static void MoveFly(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
}
|
||||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
if (Chance(0x4000) && nDist <= 0x400)
|
||||
return;
|
||||
|
|
|
@ -121,8 +121,6 @@ static void BlastSeqCallback(int, int nXSprite)
|
|||
int height = (pSprite->yrepeat*getDudeInfo(pSprite->type)->eyeHeight) << 2;
|
||||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int UNUSED(nDist) = approxDist(dx, dy);
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int x = pSprite->x;
|
||||
int y = pSprite->y;
|
||||
int z = height;
|
||||
|
@ -474,7 +472,6 @@ static void MoveForward(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
pSprite->ang = (pSprite->ang+256)&2047;
|
||||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
if ((unsigned int)Random(64) < 32 && nDist <= 0x400)
|
||||
return;
|
||||
|
@ -512,7 +509,6 @@ static void MoveSlow(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
}
|
||||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
if (Chance(0x600) && nDist <= 0x400)
|
||||
return;
|
||||
|
@ -553,7 +549,6 @@ static void MoveSwoop(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
}
|
||||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
if (Chance(0x600) && nDist <= 0x400)
|
||||
return;
|
||||
|
@ -593,7 +588,6 @@ static void MoveFly(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
}
|
||||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
if (Chance(0x4000) && nDist <= 0x400)
|
||||
return;
|
||||
|
|
|
@ -294,7 +294,6 @@ static void thinkSwimChase(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
if (nDist < pDudeInfo->seeDist && klabs(nDeltaAngle) <= pDudeInfo->periphery)
|
||||
{
|
||||
aiSetTarget(pXSprite, pXSprite->target);
|
||||
int UNUSED(floorZ) = getflorzofslope(pSprite->sectnum, pSprite->x, pSprite->y);
|
||||
if (nDist < 0x400 && klabs(nDeltaAngle) < 85)
|
||||
aiNewState(pSprite, pXSprite, &gillBeastSwimBite);
|
||||
else
|
||||
|
@ -327,7 +326,6 @@ static void sub_6CB00(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
pSprite->ang = (pSprite->ang+256)&2047;
|
||||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
if (Random(64) < 32 && nDist <= 0x400)
|
||||
return;
|
||||
|
@ -365,7 +363,6 @@ static void sub_6CD74(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int dz = z2 - z;
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
if (Chance(0x600) && nDist <= 0x400)
|
||||
return;
|
||||
|
@ -401,7 +398,6 @@ static void sub_6D03C(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
int dx = pXSprite->targetX-pSprite->x;
|
||||
int dy = pXSprite->targetY-pSprite->y;
|
||||
int dz = (z2 - z)<<3;
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
if (Chance(0x4000) && nDist <= 0x400)
|
||||
return;
|
||||
|
|
|
@ -991,8 +991,7 @@ void aiGenDudeMoveForward(spritetype* pSprite, XSPRITE* pXSprite ) {
|
|||
pSprite->ang = (pSprite->ang + 256) & 2047;
|
||||
int dx = pXSprite->targetX - pSprite->x;
|
||||
int dy = pXSprite->targetY - pSprite->y;
|
||||
int UNUSED(nAngle) = getangle(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
int nDist = approxDist(dx, dy);
|
||||
if ((unsigned int)Random(64) < 32 && nDist <= 0x400)
|
||||
return;
|
||||
int nCos = Cos(pSprite->ang);
|
||||
|
|
|
@ -86,7 +86,6 @@ static void HackSeqCallback(int, int nXSprite)
|
|||
DUDEINFO *pDudeInfoT = getDudeInfo(pTarget->type);
|
||||
int tx = pXSprite->targetX-pSprite->x;
|
||||
int ty = pXSprite->targetY-pSprite->y;
|
||||
int UNUSED(nDist) = approxDist(tx, ty);
|
||||
int nAngle = getangle(tx, ty);
|
||||
int height = (pSprite->yrepeat*pDudeInfo->eyeHeight)<<2;
|
||||
int height2 = (pTarget->yrepeat*pDudeInfoT->eyeHeight)<<2;
|
||||
|
|
|
@ -95,7 +95,6 @@ static void PukeSeqCallback(int, int nXSprite)
|
|||
int height2 = (pDudeInfoT->eyeHeight*pTarget->yrepeat);
|
||||
int tx = pXSprite->targetX-pSprite->x;
|
||||
int ty = pXSprite->targetY-pSprite->y;
|
||||
int UNUSED(nDist) = approxDist(tx, ty);
|
||||
int nAngle = getangle(tx, ty);
|
||||
int dx = Cos(nAngle)>>16;
|
||||
int dy = Sin(nAngle)>>16;
|
||||
|
|
|
@ -130,9 +130,8 @@ static int osdcmd_give(CCmdFuncPtr parm)
|
|||
return CCMD_SHOWHELP;
|
||||
}
|
||||
|
||||
static int osdcmd_god(CCmdFuncPtr UNUSED(parm))
|
||||
static int osdcmd_god(CCmdFuncPtr)
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
if (numplayers == 1 && gamestate == GS_LEVEL)
|
||||
{
|
||||
SetGodMode(!gMe->godMode);
|
||||
|
@ -144,10 +143,8 @@ static int osdcmd_god(CCmdFuncPtr UNUSED(parm))
|
|||
return CCMD_OK;
|
||||
}
|
||||
|
||||
static int osdcmd_noclip(CCmdFuncPtr UNUSED(parm))
|
||||
static int osdcmd_noclip(CCmdFuncPtr)
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
|
||||
if (numplayers == 1 && gamestate == GS_LEVEL)
|
||||
{
|
||||
SetClipMode(!gNoClip);
|
||||
|
|
|
@ -1579,7 +1579,6 @@ void FireNapalm2(int nTrigger, PLAYER *pPlayer)
|
|||
void AltFireNapalm(int nTrigger, PLAYER *pPlayer)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(nTrigger);
|
||||
char UNUSED(bAkimbo) = powerupCheck(pPlayer, kPwUpTwoGuns);
|
||||
int nSpeed = mulscale16(0x8000, 0x177777)+0x66666;
|
||||
spritetype *pMissile = playerFireThing(pPlayer, 0, -4730, kThingNapalmBall, nSpeed);
|
||||
if (pMissile)
|
||||
|
|
Loading…
Reference in a new issue