mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- Duke: Test tsprite's sector in animatesprites_d()
following crash while noclipping in Duke WT's E5L1. Apply same fix to animatesprites_r()
as well.
This commit is contained in:
parent
6aba76cfe5
commit
5aa4243327
2 changed files with 4 additions and 21 deletions
|
@ -134,14 +134,8 @@ void animatesprites_d(spritetype* tsprite, int& spritesortcnt, int x, int y, int
|
|||
continue;
|
||||
}
|
||||
|
||||
if (t->sector()->ceilingstat & 1)
|
||||
l = t->sector()->ceilingshade;
|
||||
else
|
||||
l = t->sector()->floorshade;
|
||||
|
||||
if (l < -127) l = -127;
|
||||
if (l > 128) l = 127;
|
||||
t->shade = l;
|
||||
if (t->insector())
|
||||
t->shade = clamp<int>(t->sector()->ceilingstat & 1 ? t->sector()->ceilingshade : t->sector()->floorshade, -127, 127);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -119,19 +119,8 @@ void animatesprites_r(spritetype* tsprite, int& spritesortcnt, int x, int y, int
|
|||
}
|
||||
}
|
||||
|
||||
if (t->sector()->ceilingstat & 1)
|
||||
{
|
||||
if (badguy(s))
|
||||
l = s->shade;
|
||||
else
|
||||
l = s->shade;
|
||||
}
|
||||
else
|
||||
l = t->sector()->floorshade;
|
||||
|
||||
if (l < -127) l = -127;
|
||||
if (l > 128) l = 127;
|
||||
t->shade = l;
|
||||
if (t->insector())
|
||||
t->shade = clamp<int>(t->sector()->ceilingstat & 1 ? s->shade : t->sector()->floorshade, -127, 127);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue