From f96f665e6399fbb14618accbea8befef536f7e53 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sat, 21 Jul 2012 01:51:02 +0000 Subject: [PATCH] - Fixed: R_ExtendSpriteFrames() would change spr.spriteframes even when it wasn't moving them around. SVN r3775 (trunk) --- src/r_data/sprites.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/r_data/sprites.cpp b/src/r_data/sprites.cpp index 853299228..012abb2f6 100644 --- a/src/r_data/sprites.cpp +++ b/src/r_data/sprites.cpp @@ -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 // of the SpriteFrames array. newstart = SpriteFrames.Reserve(frame - spr.numframes); + if (spr.numframes == 0) + { + spr.spriteframes = WORD(newstart); + } } else { // 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. memset(&SpriteFrames[newstart], 0, sizeof(spriteframe_t)*(frame - spr.numframes)); spr.numframes = frame; - spr.spriteframes = newstart; } //==========================================================================