mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
- 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:
@@ -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 );
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user