- 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:
Flugente
2015-03-09 18:19:34 +00:00
parent 68869f77b2
commit 6e824810ab
17 changed files with 37 additions and 20 deletions
+8 -8
View File
@@ -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;
}