mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
- Fix: profile id was used instead of profile's face id
- Fix: squad names were not used correctly - Change: spotter minimum preparation time lowered to 2 turns (was 3) - Change: spotter ct bonus has been doubled - Cahnge: spotter cth bonus now works for rifles and sniper rifles git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7774 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -22342,18 +22342,18 @@ UINT16 GridNoSpotterCTHBonus( SOLDIERTYPE* pSniper, INT32 sGridNo, UINT bTeam )
|
||||
|
||||
// relation counts twice. Also account for special background. Effectivity cannot be lower than 0%!
|
||||
effectivity = max( 0, effectivity + 2 * relation + pSoldier->GetBackgroundValue( BG_PERC_SPOTTER ) );
|
||||
|
||||
|
||||
// a good relation boosts value tremendously - a bad relation makes spotting useless
|
||||
// the spotter background also alters effectiveness
|
||||
// -> value between 0 and 2000
|
||||
value = (value * effectivity) / 100;
|
||||
|
||||
// longer spotting gives a linear bonus - up to 100% -> value between 0 and 4000
|
||||
value = (value * min( pSoldier->usSkillCounter[SOLDIER_COUNTER_SPOTTER], 2 * gGameExternalOptions.usSpotterPreparationTurns )) / gGameExternalOptions.usSpotterPreparationTurns;
|
||||
// -> value between 0 and 2000, nominal 1000
|
||||
value = (value * effectivity ) / 100;
|
||||
|
||||
// longer spotting gives a linear bonus - up to 100% -> value between 0 and 4000, nominal 2000
|
||||
value = (value * min(pSoldier->usSkillCounter[SOLDIER_COUNTER_SPOTTER], 2 * gGameExternalOptions.usSpotterPreparationTurns)) / gGameExternalOptions.usSpotterPreparationTurns;
|
||||
|
||||
// reasonable values: 0 to gGameExternalOptions.usSpotterMaxCTHBoost
|
||||
value = (value * gGameExternalOptions.usSpotterMaxCTHBoost) / 4000;
|
||||
|
||||
value = (value * gGameExternalOptions.usSpotterMaxCTHBoost) / 2000;
|
||||
|
||||
if ( value > bestvalue )
|
||||
bestvalue = value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user