mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
More corrupt map fixes
fuck ebase.map git-svn-id: https://svn.eduke32.com/eduke32@1511 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
ecb3e90817
commit
c030768d71
1 changed files with 6 additions and 4 deletions
|
@ -2936,13 +2936,15 @@ static void polymer_updatewall(int16_t wallnum)
|
|||
|
||||
if (sectofwall < 0 || sectofwall > numsectors || wallnum < 0 || wallnum > numwalls)
|
||||
return; // yay, corrupt map
|
||||
|
||||
sec = §or[sectofwall];
|
||||
if (sec->wallptr > wallnum)
|
||||
return; // the map is horribly corrupt
|
||||
|
||||
w = prwalls[wallnum];
|
||||
s = prsectors[sectofwall];
|
||||
invalid = s->invalidid;
|
||||
if (nwallnum >= 0 && nwallnum < MAXWALLS)
|
||||
if (nwallnum >= 0 && nwallnum < numwalls)
|
||||
{
|
||||
ns = prsectors[wal->nextsector];
|
||||
invalid += ns->invalidid;
|
||||
|
@ -2963,7 +2965,7 @@ static void polymer_updatewall(int16_t wallnum)
|
|||
if (picanm[wallpicnum]&192) wallpicnum += animateoffs(wallpicnum,wallnum+16384);
|
||||
walloverpicnum = wal->overpicnum;
|
||||
if (picanm[walloverpicnum]&192) walloverpicnum += animateoffs(walloverpicnum,wallnum+16384);
|
||||
if (nwallnum >= 0 && nwallnum < MAXWALLS)
|
||||
if (nwallnum >= 0 && nwallnum < numwalls)
|
||||
{
|
||||
nwallpicnum = wall[nwallnum].picnum;
|
||||
if (picanm[nwallpicnum]&192) nwallpicnum += animateoffs(nwallpicnum,wallnum+16384);
|
||||
|
@ -2982,7 +2984,7 @@ static void polymer_updatewall(int16_t wallnum)
|
|||
(wal->yrepeat == w->yrepeat) &&
|
||||
(walloverpicnum == w->overpicnum) &&
|
||||
(wal->shade == w->shade) &&
|
||||
((nwallnum == -1) ||
|
||||
((nwallnum < 0 || nwallnum > numwalls) ||
|
||||
((nwallpicnum == w->nwallpicnum) &&
|
||||
(wall[nwallnum].xpanning == w->nwallxpanning) &&
|
||||
(wall[nwallnum].ypanning == w->nwallypanning) &&
|
||||
|
@ -3006,7 +3008,7 @@ static void polymer_updatewall(int16_t wallnum)
|
|||
w->yrepeat = wal->yrepeat;
|
||||
w->overpicnum = walloverpicnum;
|
||||
w->shade = wal->shade;
|
||||
if (nwallnum >= 0 && nwallnum < MAXWALLS)
|
||||
if (nwallnum >= 0 && nwallnum < numwalls)
|
||||
{
|
||||
w->nwallpicnum = nwallpicnum;
|
||||
w->nwallxpanning = wall[nwallnum].xpanning;
|
||||
|
|
Loading…
Reference in a new issue