Skip to content

Commit

Permalink
Render structure turrets without pulling them to the ground.
Browse files Browse the repository at this point in the history
Makes structure turrets look right again.

Fixes ticket:4453
  • Loading branch information
perim committed Jul 28, 2016
1 parent 7a02641 commit d1bfaa3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/display3d.cpp
Expand Up @@ -2421,25 +2421,25 @@ void renderStructure(STRUCTURE *psStructure)
pieFlag = pie_STATIC_SHADOW | ecmFlag;
pieFlagData = 0;
}
if (defensive && !structureIsBlueprint(psStructure) && !(strImd->flags & iV_IMD_NOSTRETCH))
{
pie_SetShaderStretchDepth(psStructure->pos.z - psStructure->foundationDepth);
}
while (strImd)
{
int animFrame = 0;
if (strImd->numFrames > 0) // Calculate an animation frame
{
animFrame = getModularScaledGraphicsTime(strImd->animInterval, strImd->numFrames);
}
if (defensive && !structureIsBlueprint(psStructure) && !(strImd->flags & iV_IMD_NOSTRETCH))
{
pie_SetShaderStretchDepth(psStructure->pos.z - psStructure->foundationDepth);
}
pie_Draw3DShape(strImd, animFrame, colour, buildingBrightness, pieFlag, pieFlagData);
pie_SetShaderStretchDepth(0);
if (psStructure->sDisplay.imd->nconnectors > 0)
{
renderStructureTurrets(psStructure, strImd, buildingBrightness, pieFlag, pieFlagData, ecmFlag);
}
strImd = strImd->next;
}
pie_SetShaderStretchDepth(0);
setScreenDisp(&psStructure->sDisplay);
pie_MatEnd();
}
Expand Down

0 comments on commit d1bfaa3

Please sign in to comment.