mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- Duke/RR: Fixed sprite validation checks in animatesprites.
This commit is contained in:
parent
853aab5513
commit
507dc10e4f
2 changed files with 7 additions and 2 deletions
|
@ -557,8 +557,10 @@ void animatesprites_d(spritetype* tsprite, int& spritesortcnt, int x, int y, int
|
|||
t->picnum += k + ScriptCode[t4] + l * t3;
|
||||
|
||||
if (l > 0)
|
||||
while (!tileGetTexture(t->picnum)->isValid() && t->picnum > 0)
|
||||
{
|
||||
while (t->picnum >= 0 && t->picnum < MAXTILES && !tileGetTexture(t->picnum)->isValid())
|
||||
t->picnum -= l; //Hack, for actors
|
||||
}
|
||||
|
||||
if (h->dispicnum >= 0)
|
||||
h->dispicnum = t->picnum;
|
||||
|
|
|
@ -703,8 +703,11 @@ void animatesprites_r(spritetype* tsprite, int& spritesortcnt, int x, int y, int
|
|||
t->picnum += k + ScriptCode[t4] + l * t3;
|
||||
|
||||
if (l > 0)
|
||||
while (t->picnum >= 0 && t->picnum < MAXTILES && !tileGetTexture(t->picnum)->isValid() && t->picnum > 0)
|
||||
{
|
||||
while (t->picnum >= 0 && t->picnum < MAXTILES && !tileGetTexture(t->picnum)->isValid())
|
||||
t->picnum -= l; //Hack, for actors
|
||||
}
|
||||
|
||||
if (t->picnum < 0 || t->picnum >= MAXTILES)
|
||||
{
|
||||
t->picnum = 0;
|
||||
|
|
Loading…
Reference in a new issue