Only buildings that known are visible under fog of war.

This commit is contained in:
johns 2001-03-15 19:37:26 +00:00
parent 963e59b87d
commit 5fc66fe881

View file

@ -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;
}
}