Fix structures so they're illuminated correctly (they were previously illuminated based on whether or not their owner could see them, rather than whether or not you could).

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9342 4a71c877-e1ca-e34f-864e-861f7616d084
master
Guangcong Luo 2010-01-18 22:11:33 +00:00 committed by Git SVN Gateway
parent 79442c8560
commit 8cf40897c2
1 changed files with 3 additions and 3 deletions

View File

@ -1789,7 +1789,7 @@ 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))
if (!hasSensorOnTile(mapTile(map_coord(psFeature->pos.x), map_coord(psFeature->pos.y)), selectedPlayer))
{
brightness.byte.r /= 2;
brightness.byte.g /= 2;
@ -2122,7 +2122,7 @@ 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))
if (!hasSensorOnTile(mapTile(map_coord(psStructure->pos.x), map_coord(psStructure->pos.y)), selectedPlayer))
{
buildingBrightness.byte.r /= 2;
buildingBrightness.byte.g /= 2;
@ -2550,7 +2550,7 @@ 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))
if (!hasSensorOnTile(mapTile(map_coord(psStructure->pos.x), map_coord(psStructure->pos.y)), selectedPlayer))
{
buildingBrightness.byte.r /= 2;
buildingBrightness.byte.g /= 2;