- The facility performance tag now determines the effectiveness of the interrogation assignment (100 = standard).

- Canteens can now be refilled even if the food system is off
- If you set a handcuff's item to class from MISC (<usItemClass>268435456</usItemClass>)to KIT (<usItemClass>8192</usItemClass>), it will be treated as a stack of binders. Repeated use on enemies consumes the item.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5740 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2012-12-17 21:23:36 +00:00
parent 2d5e8b1583
commit 501df7103c
3 changed files with 34 additions and 14 deletions
+20 -3
View File
@@ -2637,7 +2637,25 @@ UINT32 CalculateInterrogationValue(SOLDIERTYPE *pSoldier, UINT16 *pusMaxPts )
INT32 threatenvalue = CalcThreateningEffectiveness( pSoldier->ubProfile ) * gMercProfiles[pSoldier->ubProfile].usApproachFactor[2] ;
usInterrogationPoints *= threatenvalue;
usInterrogationPoints /= 6500;
UINT16 performancemodifier = 100;
for (UINT16 cnt = 0; cnt < NUM_FACILITY_TYPES; ++cnt)
{
// Is this facility here?
if (gFacilityLocations[SECTOR( pSoldier->sSectorX, pSoldier->sSectorY )][cnt].fFacilityHere)
{
// we determine wether this is a prison by checking for usPrisonBaseLimit
if (gFacilityTypes[cnt].AssignmentData[FAC_INTERROGATE_PRISONERS].usPrisonBaseLimit > 0)
{
performancemodifier = gFacilityTypes[cnt].AssignmentData[FAC_INTERROGATE_PRISONERS].usPerformance;
break;
}
}
}
performancemodifier = min(1000, max(10, performancemodifier) );
usInterrogationPoints = (usInterrogationPoints * performancemodifier) / (650000);
// TODO: adjust for cop background
@@ -5548,8 +5566,7 @@ void HandlePrisonerProcessingInSector( INT16 sMapX, INT16 sMapY, INT8 bZ )
UINT32 prisonersinterrogated = interrogationpoints / 100;
// the part that gets left behind is saved to the map (but not the part that gets lost due to there not being enough prisoners)
interrogationpoints -= prisonersinterrogated * 100;
pSectorInfo->uiInterrogationHundredsLeft = (UINT8)(interrogationpoints);
pSectorInfo->uiInterrogationHundredsLeft = (UINT8)(interrogationpoints - prisonersinterrogated * 100);
if ( prisonersinterrogated > numprisoners )
prisonersinterrogated = numprisoners;