Only buildings that known are visible under fog of war.
This commit is contained in:
parent
963e59b87d
commit
5fc66fe881
1 changed files with 2 additions and 2 deletions
|
@ -766,12 +766,12 @@ global int UnitVisible(const Unit* unit)
|
|||
//
|
||||
// Check explored or if visible (building) under fog of war.
|
||||
// FIXME: need only check the boundary, not the complete rectangle.
|
||||
// FIXME: do we know this building SeenFrame!=-1 ?
|
||||
//
|
||||
for( ; (int)h>=0; --h) {
|
||||
for( w=w0; (int)w>=0; --w ) {
|
||||
if( IsMapFieldVisible(x+w,y+h)
|
||||
|| (unit->Type->Building && IsMapFieldExplored(x+w,y+h)) ) {
|
||||
|| (unit->Type->Building && unit->SeenFrame!=0xFF
|
||||
&& IsMapFieldExplored(x+w,y+h)) ) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue