mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-16 09:11:17 +00:00
- Fixed: R_ExtendSpriteFrames() would change spr.spriteframes even when it wasn't moving them around.
SVN r3775 (trunk)
This commit is contained in:
parent
ffc4398aa7
commit
f96f665e63
1 changed files with 4 additions and 1 deletions
|
@ -423,6 +423,10 @@ static void R_ExtendSpriteFrames(spritedef_t &spr, int frame)
|
||||||
// at all, so we can tack the new frames directly on to the end
|
// at all, so we can tack the new frames directly on to the end
|
||||||
// of the SpriteFrames array.
|
// of the SpriteFrames array.
|
||||||
newstart = SpriteFrames.Reserve(frame - spr.numframes);
|
newstart = SpriteFrames.Reserve(frame - spr.numframes);
|
||||||
|
if (spr.numframes == 0)
|
||||||
|
{
|
||||||
|
spr.spriteframes = WORD(newstart);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // We need to allocate space for all the sprite's frames and copy
|
{ // We need to allocate space for all the sprite's frames and copy
|
||||||
|
@ -439,7 +443,6 @@ static void R_ExtendSpriteFrames(spritedef_t &spr, int frame)
|
||||||
// Initialize all new frames to 0.
|
// Initialize all new frames to 0.
|
||||||
memset(&SpriteFrames[newstart], 0, sizeof(spriteframe_t)*(frame - spr.numframes));
|
memset(&SpriteFrames[newstart], 0, sizeof(spriteframe_t)*(frame - spr.numframes));
|
||||||
spr.numframes = frame;
|
spr.numframes = frame;
|
||||||
spr.spriteframes = newstart;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
Loading…
Reference in a new issue