mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
SW: Handle cases in which the result of an expression
with (possible) side-effects is written to an unused var. git-svn-id: https://svn.eduke32.com/eduke32@8688 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/sw/src/console.cpp # source/sw/src/jnstub.cpp # source/sw/src/save.cpp # source/sw/src/sounds.cpp # source/sw/src/swconfig.cpp
This commit is contained in:
parent
d55871927a
commit
ed6e9df07c
3 changed files with 5 additions and 10 deletions
|
@ -811,7 +811,6 @@ int PachinkoCheckWin(short SpriteNum)
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &sprite[SpriteNum];
|
||||||
USERp u = User[SpriteNum];
|
USERp u = User[SpriteNum];
|
||||||
short rnd;
|
|
||||||
|
|
||||||
u->WaitTics = 0; // Can operate it again now
|
u->WaitTics = 0; // Can operate it again now
|
||||||
|
|
||||||
|
@ -820,7 +819,7 @@ int PachinkoCheckWin(short SpriteNum)
|
||||||
if (TEST_BOOL1(sp)) return 0;
|
if (TEST_BOOL1(sp)) return 0;
|
||||||
|
|
||||||
// Well? Did I win????!
|
// Well? Did I win????!
|
||||||
rnd = RANDOM_RANGE(1000);
|
/*short rnd = */RANDOM_RANGE(1000);
|
||||||
if (RANDOM_RANGE(1000) > 900 || Pachinko_Win_Cheat)
|
if (RANDOM_RANGE(1000) > 900 || Pachinko_Win_Cheat)
|
||||||
{
|
{
|
||||||
short i, nexti;
|
short i, nexti;
|
||||||
|
|
|
@ -2280,7 +2280,6 @@ void
|
||||||
DoPlayerSlide(PLAYERp pp)
|
DoPlayerSlide(PLAYERp pp)
|
||||||
{
|
{
|
||||||
USERp u = User[pp->PlayerSprite];
|
USERp u = User[pp->PlayerSprite];
|
||||||
int ret;
|
|
||||||
int push_ret;
|
int push_ret;
|
||||||
|
|
||||||
if ((pp->slide_xvect|pp->slide_yvect) == 0)
|
if ((pp->slide_xvect|pp->slide_yvect) == 0)
|
||||||
|
@ -2308,7 +2307,7 @@ DoPlayerSlide(PLAYERp pp)
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ret = clipmove((vec3_t *)pp, &pp->cursectnum, pp->slide_xvect, pp->slide_yvect, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
|
clipmove((vec3_t *)pp, &pp->cursectnum, pp->slide_xvect, pp->slide_yvect, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
|
||||||
PlayerCheckValidMove(pp);
|
PlayerCheckValidMove(pp);
|
||||||
push_ret = pushmove((vec3_t *)pp, &pp->cursectnum, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
|
push_ret = pushmove((vec3_t *)pp, &pp->cursectnum, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
|
||||||
if (push_ret < 0)
|
if (push_ret < 0)
|
||||||
|
@ -2538,7 +2537,6 @@ void PlayerSectorBound(PLAYERp pp, int amt)
|
||||||
void
|
void
|
||||||
DoPlayerMove(PLAYERp pp)
|
DoPlayerMove(PLAYERp pp)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
USERp u = User[pp->PlayerSprite];
|
USERp u = User[pp->PlayerSprite];
|
||||||
int friction;
|
int friction;
|
||||||
int save_cstat;
|
int save_cstat;
|
||||||
|
@ -2622,7 +2620,7 @@ DoPlayerMove(PLAYERp pp)
|
||||||
save_cstat = pp->SpriteP->cstat;
|
save_cstat = pp->SpriteP->cstat;
|
||||||
RESET(pp->SpriteP->cstat, CSTAT_SPRITE_BLOCK);
|
RESET(pp->SpriteP->cstat, CSTAT_SPRITE_BLOCK);
|
||||||
COVERupdatesector(pp->posx, pp->posy, &pp->cursectnum);
|
COVERupdatesector(pp->posx, pp->posy, &pp->cursectnum);
|
||||||
ret = clipmove((vec3_t *)pp, &pp->cursectnum, pp->xvect, pp->yvect, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
|
clipmove((vec3_t *)pp, &pp->cursectnum, pp->xvect, pp->yvect, ((int)pp->SpriteP->clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER);
|
||||||
pp->SpriteP->cstat = save_cstat;
|
pp->SpriteP->cstat = save_cstat;
|
||||||
PlayerCheckValidMove(pp);
|
PlayerCheckValidMove(pp);
|
||||||
|
|
||||||
|
@ -2790,7 +2788,6 @@ DoPlayerMoveBoat(PLAYERp pp)
|
||||||
{
|
{
|
||||||
int z;
|
int z;
|
||||||
int floor_dist;
|
int floor_dist;
|
||||||
int ret;
|
|
||||||
short save_sectnum;
|
short save_sectnum;
|
||||||
SECTOR_OBJECTp sop = pp->sop;
|
SECTOR_OBJECTp sop = pp->sop;
|
||||||
|
|
||||||
|
@ -2855,7 +2852,7 @@ DoPlayerMoveBoat(PLAYERp pp)
|
||||||
pp->cursectnum = pp->sop->op_main_sector; // for speed
|
pp->cursectnum = pp->sop->op_main_sector; // for speed
|
||||||
|
|
||||||
floor_dist = labs(z - pp->sop->floor_loz);
|
floor_dist = labs(z - pp->sop->floor_loz);
|
||||||
ret = clipmove_old(&pp->posx, &pp->posy, &z, &pp->cursectnum, pp->xvect, pp->yvect, (int)pp->sop->clipdist, Z(4), floor_dist, CLIPMASK_PLAYER);
|
clipmove_old(&pp->posx, &pp->posy, &z, &pp->cursectnum, pp->xvect, pp->yvect, (int)pp->sop->clipdist, Z(4), floor_dist, CLIPMASK_PLAYER);
|
||||||
|
|
||||||
OperateSectorObject(pp->sop, pp->pang, pp->posx, pp->posy);
|
OperateSectorObject(pp->sop, pp->pang, pp->posx, pp->posy);
|
||||||
pp->cursectnum = save_sectnum; // for speed
|
pp->cursectnum = save_sectnum; // for speed
|
||||||
|
|
|
@ -1080,7 +1080,6 @@ DoExplodeSector(short match)
|
||||||
{
|
{
|
||||||
short orig_ang;
|
short orig_ang;
|
||||||
int zh;
|
int zh;
|
||||||
USERp u;
|
|
||||||
short cf,nextcf;
|
short cf,nextcf;
|
||||||
|
|
||||||
SPRITEp esp;
|
SPRITEp esp;
|
||||||
|
@ -1096,7 +1095,7 @@ DoExplodeSector(short match)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!User[cf])
|
if (!User[cf])
|
||||||
u = SpawnUser(cf, 0, NULL);
|
/*u = */SpawnUser(cf, 0, NULL);
|
||||||
|
|
||||||
sectp = §or[esp->sectnum];
|
sectp = §or[esp->sectnum];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue