Do not draw repair and baba muzzle flashes if structure is not seen by current player.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8868 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
9e817f6537
commit
1f40cec1e3
|
@ -2294,7 +2294,7 @@ void renderStructure(STRUCTURE *psStructure)
|
|||
pie_TRANSLATE(0, 0, psStructure->asWeaps[i].recoilValue);
|
||||
|
||||
pie_Draw3DShape(weaponImd[i], playerFrame, 0, buildingBrightness, WZCOL_BLACK, pieFlag, pieFlagData);
|
||||
if (psStructure->status == SS_BUILT)
|
||||
if (psStructure->status == SS_BUILT && psStructure->visible[selectedPlayer] > (UBYTE_MAX / 2))
|
||||
{
|
||||
if (psStructure->pStructureType->type == REF_REPAIR_FACILITY)
|
||||
{
|
||||
|
@ -2327,8 +2327,7 @@ void renderStructure(STRUCTURE *psStructure)
|
|||
}
|
||||
}
|
||||
// we have a weapon so we draw a muzzle flash
|
||||
if( weaponImd[i]->nconnectors && flashImd[i] && psStructure->visible[selectedPlayer]>(UBYTE_MAX/2)
|
||||
&& psStructure->pStructureType->type != REF_REPAIR_FACILITY)
|
||||
if( weaponImd[i]->nconnectors && flashImd[i] && psStructure->pStructureType->type != REF_REPAIR_FACILITY)
|
||||
{
|
||||
unsigned int connector_num = 0;
|
||||
|
||||
|
@ -2394,7 +2393,9 @@ void renderStructure(STRUCTURE *psStructure)
|
|||
iV_TRANSLATE(0, 0, -40);
|
||||
}
|
||||
iV_MatrixRotateX(DEG(psStructure->asWeaps[i].pitch));
|
||||
// and draw the muzzle flash
|
||||
// draw the muzzle flash?
|
||||
if (psStructure && psStructure->visible[selectedPlayer] > UBYTE_MAX / 2)
|
||||
{
|
||||
// animate for the duration of the flash only
|
||||
// assume no clan colours for muzzle effects
|
||||
if (flashImd[i]->numFrames == 0 || flashImd[i]->animInterval <= 0)
|
||||
|
@ -2413,6 +2414,7 @@ void renderStructure(STRUCTURE *psStructure)
|
|||
pie_Draw3DShape(flashImd[i], 0, 0, buildingBrightness, WZCOL_BLACK, 0, 0); //muzzle flash
|
||||
}
|
||||
}
|
||||
}
|
||||
iV_MatrixEnd();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue