Add new PIE flag 0x00001000 that specifies that the PIE model should not be stretched to fit to terrain.

master
Per Inge Mathisen 2010-12-29 10:57:38 +01:00
parent 4eed3bef79
commit 086a0fd4bc
2 changed files with 4 additions and 3 deletions

View File

@ -37,12 +37,13 @@
//************************************************************************* //*************************************************************************
// PIE model flags // PIE model flags
#define iV_IMD_NOSTRETCH 0x00001000
#define iV_IMD_TCMASK 0x00010000 #define iV_IMD_TCMASK 0x00010000
// polygon flags b0..b7: col, b24..b31: anim index // polygon flags b0..b7: col, b24..b31: anim index
#define iV_IMD_TEX 0x00000200 #define iV_IMD_TEX 0x00000200 // this is both a polygon and pie flag
#define iV_IMD_TEXANIM 0x00004000 // iV_IMD_TEX must be set also #define iV_IMD_TEXANIM 0x00004000 // iV_IMD_TEX must be set also
//************************************************************************* //*************************************************************************

View File

@ -2232,7 +2232,7 @@ void renderStructure(STRUCTURE *psStructure)
pieFlag = pie_STATIC_SHADOW; pieFlag = pie_STATIC_SHADOW;
pieFlagData = 0; pieFlagData = 0;
} }
if (defensive && !structureIsBlueprint(psStructure)) if (defensive && !structureIsBlueprint(psStructure) && !(strImd->flags & iV_IMD_NOSTRETCH))
{ {
pie_SetShaderStretchDepth(psStructure->pos.z - psStructure->foundationDepth); pie_SetShaderStretchDepth(psStructure->pos.z - psStructure->foundationDepth);
} }