- mercs are now used as prison guards regardless of sleep state

- volunteers are now gained with a logarithmic rate, as otherwise the volunteer feature becomes pointless lategame

For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=22559&goto=350394&#msg_350394

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8431 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2017-07-25 20:46:28 +00:00
parent fe45820b02
commit 7b00af164b
2 changed files with 6 additions and 5 deletions
+4 -3
View File
@@ -3140,8 +3140,9 @@ UINT32 CalculatePrisonGuardValue(SOLDIERTYPE *pSoldier )
// this is not an assignment. Simply being in the sector will allow us to be counted as guards
UINT32 usValue = 0;
if ( pSoldier->flags.fMercAsleep )
return 0;
// for simplicity, ignore sleep status (forcing the player to finetune sleeping is annoying)
/*if ( psoldier->flags.fMercAsleep )
return 0;*/
// anv: undercover snitches don't count as guards as they don't guard in traditional sense
if ( pSoldier->bAssignment == FACILITY_PRISON_SNITCH )
@@ -3214,7 +3215,7 @@ UINT32 CalculateAllGuardsValueInPrison( INT16 sMapX, INT16 sMapY, INT8 bZ )
UINT32 lastid = gTacticalStatus.Team[ OUR_TEAM ].bLastID;
for ( uiCnt = firstid, pSoldier = MercPtrs[ uiCnt ]; uiCnt <= lastid; ++uiCnt, ++pSoldier)
{
if( pSoldier->bActive && ( pSoldier->sSectorX == sMapX ) && ( pSoldier->sSectorY == sMapY ) && ( pSoldier->bSectorZ == bZ) && !pSoldier->flags.fMercAsleep )
if( pSoldier->bActive && ( pSoldier->sSectorX == sMapX ) && ( pSoldier->sSectorY == sMapY ) && ( pSoldier->bSectorZ == bZ) )
{
prisonguardvalue += CalculatePrisonGuardValue(pSoldier );
}
+2 -2
View File
@@ -2598,14 +2598,14 @@ FLOAT CalcHourlyVolunteerGain()
UINT8 ubTownID = StrategicMap[CALCULATE_STRATEGIC_INDEX( sX, sY )].bNameId;
if ( ubTownID != BLANK_SECTOR )
{
UINT16 population = GetSectorPopulation( sX, sY );
UINT16 population = GetSectorPopulation( sX, sY, FALSE );
loyalpopulation += gTownLoyalty[ubTownID].ubRating * population / 100;
}
}
}
FLOAT hourlygain = loyalpopulation * populationmodifier * gGameExternalOptions.dMilitiaVolunteerGainFactorHourly;
FLOAT hourlygain = log( 1.0 + loyalpopulation * populationmodifier * gGameExternalOptions.dMilitiaVolunteerGainFactorHourly);
return hourlygain;
}