mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
In G_MoveStandables() CRACKx handling, fix oob access of DynamicTileMap[].
Also, in two cases, don't assign A_IncurDamage() result to a variable if it's not needed. git-svn-id: https://svn.eduke32.com/eduke32@3681 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
3b39a87bd1
commit
732a1ca33c
1 changed files with 28 additions and 22 deletions
|
@ -1961,31 +1961,37 @@ ACTOR_STATIC void G_MoveStandables(void)
|
|||
{
|
||||
if (s->hitag > 0)
|
||||
{
|
||||
int32_t k;
|
||||
|
||||
t[0] = s->cstat;
|
||||
t[1] = s->ang;
|
||||
|
||||
switch (DYNAMICTILEMAP(A_IncurDamage(i)))
|
||||
{
|
||||
case FIREEXT__STATIC:
|
||||
case RPG__STATIC:
|
||||
case RADIUSEXPLOSION__STATIC:
|
||||
case SEENINE__STATIC:
|
||||
case OOZFILTER__STATIC:
|
||||
for (SPRITES_OF(STAT_STANDABLE, j))
|
||||
k = A_IncurDamage(i);
|
||||
|
||||
if (k >= 0)
|
||||
switch (DYNAMICTILEMAP(k))
|
||||
{
|
||||
if (s->hitag == sprite[j].hitag && (sprite[j].picnum == OOZFILTER || sprite[j].picnum == SEENINE))
|
||||
if (sprite[j].shade != -32)
|
||||
sprite[j].shade = -32;
|
||||
case FIREEXT__STATIC:
|
||||
case RPG__STATIC:
|
||||
case RADIUSEXPLOSION__STATIC:
|
||||
case SEENINE__STATIC:
|
||||
case OOZFILTER__STATIC:
|
||||
for (SPRITES_OF(STAT_STANDABLE, j))
|
||||
{
|
||||
if (s->hitag == sprite[j].hitag && (sprite[j].picnum == OOZFILTER || sprite[j].picnum == SEENINE))
|
||||
if (sprite[j].shade != -32)
|
||||
sprite[j].shade = -32;
|
||||
}
|
||||
|
||||
goto DETONATE;
|
||||
|
||||
default:
|
||||
s->cstat = t[0];
|
||||
s->ang = t[1];
|
||||
s->extra = 0;
|
||||
|
||||
goto BOLT;
|
||||
}
|
||||
|
||||
goto DETONATE;
|
||||
default:
|
||||
s->cstat = t[0];
|
||||
s->ang = t[1];
|
||||
s->extra = 0;
|
||||
|
||||
goto BOLT;
|
||||
}
|
||||
}
|
||||
goto BOLT;
|
||||
}
|
||||
|
@ -2446,7 +2452,7 @@ CLEAR_THE_BOLT:
|
|||
case CANWITHSOMETHING3__STATIC:
|
||||
case CANWITHSOMETHING4__STATIC:
|
||||
A_Fall(i);
|
||||
if ((j = A_IncurDamage(i)) >= 0)
|
||||
if (A_IncurDamage(i) >= 0)
|
||||
{
|
||||
A_PlaySound(VENT_BUST,i);
|
||||
|
||||
|
@ -6376,7 +6382,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
|||
sc->ceilingshade = 0;
|
||||
}
|
||||
|
||||
if ((j = A_IncurDamage(i)) >= 0)
|
||||
if (A_IncurDamage(i) >= 0)
|
||||
{
|
||||
if (++t[3] == 5)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue