Fix bug #1483 - unbuilt structures and walls shouldn't confer visibility.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9536 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
21d38e3685
commit
850cc41653
|
@ -5935,6 +5935,8 @@ void buildingComplete(STRUCTURE *psBuilding)
|
|||
psBuilding->currentBuildPts = (SWORD)psBuilding->pStructureType->buildPoints;
|
||||
psBuilding->status = SS_BUILT;
|
||||
|
||||
visTilesUpdate((BASE_OBJECT *)psBuilding, rayTerrainCallback);
|
||||
|
||||
switch (psBuilding->pStructureType->type)
|
||||
{
|
||||
case REF_POWER_GEN:
|
||||
|
|
|
@ -304,6 +304,17 @@ void visTilesUpdate(BASE_OBJECT *psObj, RAY_CALLBACK callback)
|
|||
// Remove previous map visibility provided by object
|
||||
visRemoveVisibility(psObj);
|
||||
|
||||
if (psObj->type == OBJ_STRUCTURE)
|
||||
{
|
||||
STRUCTURE * psStruct = (STRUCTURE *)psObj;
|
||||
if (psStruct->status != SS_BUILT ||
|
||||
psStruct->pStructureType->type == REF_WALL || psStruct->pStructureType->type == REF_WALLCORNER)
|
||||
{
|
||||
// unbuilt structures and walls do not confer visibility.
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Do the whole circle in 80 steps
|
||||
for (ray = 0; ray < NUM_RAYS; ray += NUM_RAYS / 80)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue