Darken features and building that you cannot see, just like the tiles they stand on.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9323 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
d1ca417ef2
commit
9fed940d7c
|
@ -1789,6 +1789,12 @@ void renderFeature(FEATURE *psFeature)
|
|||
{
|
||||
brightness = pal_SetBrightness(avGetObjLightLevel((BASE_OBJECT*)psFeature, brightness.byte.r));
|
||||
}
|
||||
if (!hasSensorOnTile(mapTile(map_coord(psFeature->pos.x), map_coord(psFeature->pos.y)), psFeature->player))
|
||||
{
|
||||
brightness.byte.r /= 2;
|
||||
brightness.byte.g /= 2;
|
||||
brightness.byte.b /= 2;
|
||||
}
|
||||
|
||||
if (psFeature->psStats->subType == FEAT_BUILDING
|
||||
|| psFeature->psStats->subType == FEAT_SKYSCRAPER
|
||||
|
@ -2116,6 +2122,12 @@ void renderStructure(STRUCTURE *psStructure)
|
|||
{
|
||||
buildingBrightness = pal_SetBrightness(avGetObjLightLevel((BASE_OBJECT*)psStructure, buildingBrightness.byte.r));
|
||||
}
|
||||
if (!hasSensorOnTile(mapTile(map_coord(psStructure->pos.x), map_coord(psStructure->pos.y)), psStructure->player))
|
||||
{
|
||||
buildingBrightness.byte.r /= 2;
|
||||
buildingBrightness.byte.g /= 2;
|
||||
buildingBrightness.byte.b /= 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (!defensive)
|
||||
|
@ -2538,6 +2550,12 @@ static BOOL renderWallSection(STRUCTURE *psStructure)
|
|||
{
|
||||
buildingBrightness = pal_SetBrightness(avGetObjLightLevel((BASE_OBJECT*)psStructure, buildingBrightness.byte.r));
|
||||
}
|
||||
if (!hasSensorOnTile(mapTile(map_coord(psStructure->pos.x), map_coord(psStructure->pos.y)), psStructure->player))
|
||||
{
|
||||
buildingBrightness.byte.r /= 2;
|
||||
buildingBrightness.byte.g /= 2;
|
||||
buildingBrightness.byte.b /= 2;
|
||||
}
|
||||
}
|
||||
|
||||
brightness = buildingBrightness;
|
||||
|
|
Loading…
Reference in New Issue