Merged from revision: 7579

Externalized (by Buggler):
- Kingpin's faction sector and roaming gridno around tony shop if they become hostile
- Queen's alternate grid no if basement sector is cleared
- Doreen's kids sector that is being freed
- Single sector towns does not give global loyalty bonus instead of previously hardcoded Tixa and Orta sector
- Enemy investigation town sectors if current loaded sector is player-controlled
- Associated town sectors to mine when mine runs out

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7580 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2014-10-17 16:25:58 +00:00
parent a87e977769
commit f9cad94471
5 changed files with 54 additions and 109 deletions
+10 -5
View File
@@ -269,17 +269,21 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B
if ((bTownId != OMERTA) || (GetWorldDay() != 1))
{
ubSectorID = (UINT8)SECTOR( sMapX, sMapY );
if( !bMapZ && ubSectorID != SEC_J9 && ubSectorID != SEC_K4 )
if( !bMapZ )
{
HandleMoraleEvent( NULL, MORALE_TOWN_LIBERATED, sMapX, sMapY, bMapZ );
// single sector towns does not give global loyalty bonus
if( GetTownSectorSize( bTownId ) != 1 )
{
#ifdef JA2UB
//Ja25: no loyalty
#else
HandleGlobalLoyaltyEvent( GLOBAL_LOYALTY_GAIN_TOWN_SECTOR, sMapX, sMapY, bMapZ );
#endif
// liberation by definition requires that the place was enemy controlled in the first place
CheckIfEntireTownHasBeenLiberated( bTownId, sMapX, sMapY );
}
// liberation by definition requires that the place was enemy controlled in the first place
CheckIfEntireTownHasBeenLiberated( bTownId, sMapX, sMapY );
}
}
}
@@ -368,8 +372,9 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B
//Ja25 No strategic ai
#else
if( sMapX == 3 && sMapY == 16 && bMapZ == 1 )
{ //Basement sector (P3_b1)
if( sMapX == gModSettings.ubQueenBasementSectorX && sMapY == gModSettings.ubQueenBasementSectorY
&& bMapZ == gModSettings.ubQueenBasementSectorZ )
{ //Basement sector
gfUseAlternateQueenPosition = TRUE;
}
#endif