Merged revision(s) 7014 from branches/ja2_source_official_2014:

- Fix: snitches report mercenaries and vehicles complain about pay even if they receive none
- Fix: if NO_ENEMY_DETECTION_WITHOUT_RECON is FALSE, every sector is reported to contain enemies

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7015 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2014-03-03 20:23:13 +00:00
parent 17ed67f578
commit 95b1c783eb
2 changed files with 12 additions and 16 deletions
+8 -11
View File
@@ -6402,11 +6402,9 @@ UINT32 WhatPlayerKnowsAboutEnemiesInSector( INT16 sSectorX, INT16 sSectorY )
// Accurate information // Accurate information
return KNOWS_HOW_MANY; return KNOWS_HOW_MANY;
} }
else
{ // Accurate information including direction of travel!
// Accurate information including direction of travel! return KNOWS_HOW_MANY_AND_WHERE_GOING;
return KNOWS_HOW_MANY_AND_WHERE_GOING;
}
} }
@@ -6477,7 +6475,6 @@ void HandleShowingOfEnemyForcesInSector( INT16 sSectorX, INT16 sSectorY, INT8 bS
{ {
INT16 sNumberOfEnemies = 0; INT16 sNumberOfEnemies = 0;
// ATE: If game has just started, don't do it! // ATE: If game has just started, don't do it!
if ( DidGameJustStart() ) if ( DidGameJustStart() )
{ {
@@ -6496,15 +6493,16 @@ void HandleShowingOfEnemyForcesInSector( INT16 sSectorX, INT16 sSectorY, INT8 bS
// get total number of badguys here // get total number of badguys here
sNumberOfEnemies = NumEnemiesInSector( sSectorX, sSectorY ); sNumberOfEnemies = NumEnemiesInSector( sSectorX, sSectorY );
// Flugente: snitch reports can be false - we assume an enemy patrol where there is none. Unfortunately, that would always be the case if fNoEnemyDetectionWithoutReconis false - we detect something everywhere,
// so every sector gets a red question mark. In that case, get out of here
// anv: probability of false enemy reports!
// anyone here? // anyone here?
if( !sNumberOfEnemies ) if( !sNumberOfEnemies && !gGameExternalOptions.fNoEnemyDetectionWithoutRecon )
{ {
// nope - display nothing // nope - display nothing
// anv: probability of false enemy reports! return;
//return;
} }
switch ( WhatPlayerKnowsAboutEnemiesInSector( sSectorX, sSectorY ) ) switch ( WhatPlayerKnowsAboutEnemiesInSector( sSectorX, sSectorY ) )
{ {
// HEADROCK HAM 5: New cases below for showing enemy group heading. // HEADROCK HAM 5: New cases below for showing enemy group heading.
@@ -6536,7 +6534,6 @@ void HandleShowingOfEnemyForcesInSector( INT16 sSectorX, INT16 sSectorY, INT8 bS
// display their direction of movement, if valid. // display their direction of movement, if valid.
ShowEnemyGroupsInMotion( sSectorX, sSectorY ); ShowEnemyGroupsInMotion( sSectorX, sSectorY );
break; break;
} }
} }
+4 -5
View File
@@ -177,14 +177,13 @@ BOOLEAN MercThinksHisMoraleIsTooLow( SOLDIERTYPE *pSoldier )
BOOLEAN MercIsOwedTooMuchMoney( UINT8 ubProfileID ) BOOLEAN MercIsOwedTooMuchMoney( UINT8 ubProfileID )
{ {
if(gMercProfiles[ ubProfileID ].iBalance >= gMercProfiles[ ubProfileID ].sSalary * gMoraleSettings.bValues[MORALE_OWED_MONEY_DAYS]) // merc complains if he he actually receives pay and did not get paid long enough
if( gMercProfiles[ ubProfileID ].sSalary > 0 && gMercProfiles[ ubProfileID ].iBalance >= gMercProfiles[ ubProfileID ].sSalary * gMoraleSettings.bValues[MORALE_OWED_MONEY_DAYS])
{ {
return(TRUE); return(TRUE);
} }
else
{ return(FALSE);
return(FALSE);
}
} }
BOOLEAN MercThinksPlayerIsInactiveTooLong( UINT8 ubProfileID ) BOOLEAN MercThinksPlayerIsInactiveTooLong( UINT8 ubProfileID )