mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Added camouflage bonus to the survival trait (by rftr).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9193 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+12
-2
@@ -630,12 +630,17 @@ INT8 GetSightAdjustmentCamouflageOnTerrain( SOLDIERTYPE* pSoldier, const UINT8&
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT8 scaler = -(ANIM_STAND+1 - ubStance); // stand = 7-6 => 10%, crouch = 7-3 => 66%, prone = 7-1 => 100%;
|
||||
INT16 scaler = -(ANIM_STAND+1 - ubStance); // stand = 7-6 => 10%, crouch = 7-3 => 66%, prone = 7-1 => 100%;
|
||||
|
||||
UINT8 effectiveness = gGameExternalOptions.ubCamouflageEffectiveness;
|
||||
|
||||
effectiveness += (UINT8)(pSoldier->GetBackgroundValue(BG_PERC_CAMO));
|
||||
|
||||
if (ProfileHasSkillTrait(pSoldier->ubProfile, SURVIVAL_NT))
|
||||
{
|
||||
effectiveness += gSkillTraitValues.ubSVCamoEffectivenessBonus;
|
||||
}
|
||||
|
||||
scaler = effectiveness * scaler / 6;
|
||||
|
||||
switch(ubTerrainType) {
|
||||
@@ -668,12 +673,17 @@ INT8 GetDetailedSightAdjustmentCamouflageOnTerrain( SOLDIERTYPE* pSoldier, const
|
||||
|
||||
INT8 bStanceModifier = zGivenTileProperties.bCamoStanceModifer;
|
||||
|
||||
INT8 scaler = -(ANIM_STAND+1 - max(ANIM_PRONE, ubStance - bStanceModifier)); // stand = 7-6 => 10%, crouch = 7-3 => 66%, prone = 7-1 => 100%;
|
||||
INT16 scaler = -(ANIM_STAND+1 - max(ANIM_PRONE, ubStance - bStanceModifier)); // stand = 7-6 => 10%, crouch = 7-3 => 66%, prone = 7-1 => 100%;
|
||||
|
||||
UINT8 effectiveness = gGameExternalOptions.ubCamouflageEffectiveness;
|
||||
|
||||
effectiveness += (UINT8)(pSoldier->GetBackgroundValue(BG_PERC_CAMO));
|
||||
|
||||
if (ProfileHasSkillTrait(pSoldier->ubProfile, SURVIVAL_NT))
|
||||
{
|
||||
effectiveness += gSkillTraitValues.ubSVCamoEffectivenessBonus;
|
||||
}
|
||||
|
||||
scaler = effectiveness * scaler / 6;
|
||||
if(gGameExternalOptions.fAlternateMultiTerrainCamoCalculation)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user