mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Fix negative array access in premap.c
git-svn-id: https://svn.eduke32.com/eduke32@2172 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
cd6e846fac
commit
65e0e75a8c
1 changed files with 25 additions and 21 deletions
|
@ -1331,34 +1331,38 @@ static inline void prelevel(char g)
|
||||||
{
|
{
|
||||||
switchpicnum = W_FORCEFIELD;
|
switchpicnum = W_FORCEFIELD;
|
||||||
}
|
}
|
||||||
switch (DynamicTileMap[switchpicnum])
|
|
||||||
|
if (switchpicnum >= 0)
|
||||||
{
|
{
|
||||||
case FANSHADOW__STATIC:
|
switch (DynamicTileMap[switchpicnum])
|
||||||
case FANSPRITE__STATIC:
|
{
|
||||||
wall->cstat |= 65;
|
case FANSHADOW__STATIC:
|
||||||
animwall[g_numAnimWalls].wallnum = i;
|
case FANSPRITE__STATIC:
|
||||||
g_numAnimWalls++;
|
wall->cstat |= 65;
|
||||||
break;
|
animwall[g_numAnimWalls].wallnum = i;
|
||||||
|
g_numAnimWalls++;
|
||||||
|
break;
|
||||||
|
|
||||||
case W_FORCEFIELD__STATIC:
|
case W_FORCEFIELD__STATIC:
|
||||||
if (wal->overpicnum==W_FORCEFIELD__STATIC)
|
if (wal->overpicnum==W_FORCEFIELD__STATIC)
|
||||||
for (j=0; j<3; j++)
|
for (j=0; j<3; j++)
|
||||||
tloadtile(W_FORCEFIELD+j, 0);
|
tloadtile(W_FORCEFIELD+j, 0);
|
||||||
if (wal->shade > 31)
|
if (wal->shade > 31)
|
||||||
wal->cstat = 0;
|
wal->cstat = 0;
|
||||||
else wal->cstat |= 85+256;
|
else wal->cstat |= 85+256;
|
||||||
|
|
||||||
|
|
||||||
if (wal->lotag && wal->nextwall >= 0)
|
if (wal->lotag && wal->nextwall >= 0)
|
||||||
wall[wal->nextwall].lotag =
|
wall[wal->nextwall].lotag =
|
||||||
wal->lotag;
|
wal->lotag;
|
||||||
|
|
||||||
case BIGFORCE__STATIC:
|
case BIGFORCE__STATIC:
|
||||||
|
|
||||||
animwall[g_numAnimWalls].wallnum = i;
|
animwall[g_numAnimWalls].wallnum = i;
|
||||||
g_numAnimWalls++;
|
g_numAnimWalls++;
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wal->extra = -1;
|
wal->extra = -1;
|
||||||
|
|
Loading…
Reference in a new issue