mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Feature improvement:
- If MILITIA_USE_SECTOR_EQUIPMENT is TRUE and you assign a merc to the 'MOVE ITEM' assignment, you can select wether gear that the militia can use should be ignored. - To prevent confusion, 'MOVE ITEM' has been renamed 'GETITEM'. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7517 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2069,12 +2069,18 @@ void HandleDynamicOpinionChange( SOLDIERTYPE* pSoldier, UINT8 usEvent, BOOLEAN f
|
||||
if ( !pTeamSoldier->iTotalContractLength || (pTeamSoldier->ubWhatKindOfMercAmI != MERC_TYPE__AIM_MERC && pTeamSoldier->ubWhatKindOfMercAmI != MERC_TYPE__MERC && pTeamSoldier->ubWhatKindOfMercAmI != MERC_TYPE__NPC_WITH_UNEXTENDABLE_CONTRACT) )
|
||||
continue;
|
||||
|
||||
// A gets offended of B if
|
||||
// mean wage(B) >= ( WAGE_ACCEPTANCE_FACTOR * level(B) / level(A) ) * mean wage(A)
|
||||
// which equals
|
||||
// mean wage(B) / level(B) >= WAGE_ACCEPTANCE_FACTOR * mean wage(A) / level(A)
|
||||
|
||||
// their wage
|
||||
UINT32 theirmeanwage = gMercProfiles[pTeamSoldier->ubProfile].uiTotalCostToDate / pTeamSoldier->iTotalContractLength;
|
||||
|
||||
// adjust this for experience levels
|
||||
FLOAT explevelfactor = gGameExternalOptions.fDynamicWageFactor * pTeamSoldier->stats.bExpLevel / explevel;
|
||||
|
||||
// abort if their mean wage isn't that high
|
||||
if ( theirmeanwage < explevelfactor * meanwage )
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user