Skip to content

Commit

Permalink
Fix hardcoded number of frames for structure animations.
Browse files Browse the repository at this point in the history
N.B. Animation rates remain hardcoded for now.

Closes #1871.
(cherry picked from commit 55bea09)
(cherry picked from commit 02ced5e)
  • Loading branch information
Safety0ff authored and vexed committed Jun 16, 2012
1 parent 6ff93f6 commit 190c7a9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/display3d.cpp
Expand Up @@ -2224,11 +2224,10 @@ void renderStructure(STRUCTURE *psStructure)
colour = getPlayerColour(psStructure->player);
animFrame = 0;

/* Power stations and factories have pulsing lights. Hack for fortresses, since they need team colour. */
if (!defensive && psStructure->sDisplay.imd->numFrames > 0 && !(bMultiPlayer && psStructure->pStructureType->type == REF_BLASTDOOR))
if (strImd->numFrames > 0)
{
// Calculate an animation frame
animFrame = getModularScaledGraphicsTime(STRUCTURE_ANIM_RATE*GAME_TICKS_PER_SEC, STRUCTURE_ANIM_RATE);
animFrame = getModularScaledGraphicsTime(STRUCTURE_ANIM_RATE*GAME_TICKS_PER_SEC, strImd->numFrames);
}

// -------------------------------------------------------------------------------
Expand Down

0 comments on commit 190c7a9

Please sign in to comment.