- Fixed hidden towns and sam sites a dead giveaway when calling info box in strategic screen (by Buggler)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6604 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2013-11-15 19:28:27 +00:00
parent ba31e849e4
commit 4ad50accc6
2 changed files with 51 additions and 15 deletions
+9 -6
View File
@@ -53,10 +53,13 @@ void AddFacilitiesToBox( INT16 sMapX, INT16 sMapY, UINT32 *uiHandle, BOOLEAN fCi
{
if (fCityInfoBox && uiNumFacilities == 0 && !fHeaderAdded )
{
// For a city info box, always show this line on the left side.
swprintf( szFacilityString, L"%s:", pwTownInfoStrings[ 8 ] );
AddMonoString( uiHandle, szFacilityString );
fHeaderAdded = TRUE;
// For a city info box, always show this line on the left side if not hidden
if( gfHiddenTown[ GetTownIdForSector( sMapX, sMapY ) ] )
{
swprintf( szFacilityString, L"%s:", pwTownInfoStrings[ 8 ] );
AddMonoString( uiHandle, szFacilityString );
fHeaderAdded = TRUE;
}
}
// Facility type exists at this location?
if (gFacilityLocations[SECTOR(sMapX,sMapY)][cnt].fFacilityHere)
@@ -82,9 +85,9 @@ void AddFacilitiesToBox( INT16 sMapX, INT16 sMapY, UINT32 *uiHandle, BOOLEAN fCi
}
}
if( uiNumFacilities == 0 && fCityInfoBox )
if( uiNumFacilities == 0 && fCityInfoBox && gfHiddenTown[ GetTownIdForSector( sMapX, sMapY ) ])
{
// Add "NONE" on the right side. Only happens when the sector is a city.
// Add "NONE" on the right side. Only happens when the sector is a non-hidden city.
AddSecondColumnMonoString( uiHandle, sFacilitiesStrings[0] );
return;
}