Merged revision(s) 7209 from branches/ja2_source_official_2014:

- improved prisoner handling code

- Fix: imprisoned officers were wrongly converted into elites


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7210 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2014-05-18 14:40:58 +00:00
parent c117a02441
commit cf1b9982ba
12 changed files with 44 additions and 65 deletions
+1 -14
View File
@@ -10649,19 +10649,6 @@ void ChangeNumberOfPrisoners( SECTORINFO *pSectorInfo, INT16 aOfficer, INT16 aEl
pSectorInfo->uiNumberOfPrisonersOfWar[PRISONER_ELITE] = max(0, min(255, pSectorInfo->uiNumberOfPrisonersOfWar[PRISONER_ELITE] + aElite) );
pSectorInfo->uiNumberOfPrisonersOfWar[PRISONER_REGULAR] = max(0, min(255, pSectorInfo->uiNumberOfPrisonersOfWar[PRISONER_REGULAR] + aRegular) );
pSectorInfo->uiNumberOfPrisonersOfWar[PRISONER_ADMIN] = max(0, min(255, pSectorInfo->uiNumberOfPrisonersOfWar[PRISONER_ADMIN] + aAdmin) );
// anv: handle change of number of prisoners knowing snitch's identity
//if( sX != 0 && sY != 0 )
//{
// for( UINT8 cnt = 0; cnt < NUM_PROFILES; cnt++ )
// {
// if( gMercProfiles[ cnt ].ubExposedInSector[ SECTOR(sX, sY) ] != 0 )
// {
// gMercProfiles[ cnt ].ubExposedInSector[ SECTOR(sX, sY) ] = max( 0, min( 255, gMercProfiles[ cnt ].ubExposedInSector[ SECTOR(sX, sY) ] + aSpecial + aElite + aRegular + aAdmin ) );
// }
// }
//}
}
void ChangeNumberOfPrisoners( UNDERGROUND_SECTORINFO *pSectorInfo, INT16 aOfficer, INT16 aElite, INT16 aRegular, INT16 aAdmin )
@@ -10693,7 +10680,7 @@ void DeleteAllPrisoners( UNDERGROUND_SECTORINFO *pSectorInfo )
pSectorInfo->uiNumberOfPrisonersOfWar[i] = 0;
}
// used when the player kills a prisoner. We kill of high-value prisoners first, to punish this kind of behaviour
// used when the player kills a prisoner. We kill off high-value prisoners first, to punish this kind of behaviour
void KillOnePrisoner( SECTORINFO *pSectorInfo )
{
if ( !pSectorInfo )