mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
Bugfix: Feature Swap merc faces
When swapping merc faces in tactical the game will now rebuild the mercs squad. Changed NCTH behaviour for lasers: When USE_NEW_CTH_CALCULATION = TRUE in Ja2_Options.ini the game now uses the item property <BestLaserRange> now for a laser specific bonus instead of <ProjectionFactor>. This bonus is a percentage reduction of the base aperture in NCTH. This functionality will only be used if one of the following new parameters in CTHConstants.ini is NOT 0. LASER_PERFORMANCE_BONUS_HIP LASER_PERFORMANCE_BONUS_IRON LASER_PERFORMANCE_BONUS_SCOPE This functionality also affects the laser property that is displayed in UDB. Changed NCTH behaviour for Iron Sights and other 1x sights: Iron sights and other 1x sights can now receive a bonus in NCTH to make them more useful compared to scopes. This bonus is a percentage reduction of the base aperture just like lasers can do. There is a new parameter in CTHConstants.ini for this: IRON_SIGHT_PERFORMANCE_BONUS git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6370 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+24
-4
@@ -3128,7 +3128,7 @@ UINT32 CalculateCarriedWeight( SOLDIERTYPE * pSoldier )
|
||||
{
|
||||
ubStrengthForCarrying = (ubStrengthForCarrying * (100 + gSkillTraitValues.ubBBCarryWeightBonus) / 100); // plus one third
|
||||
}
|
||||
|
||||
|
||||
ubStrengthForCarrying = (ubStrengthForCarrying * (100 + pSoldier->GetBackgroundValue(BG_PERC_CARRYSTRENGTH)) / 100);
|
||||
|
||||
// for now, assume soldiers can carry 1/2 their strength in KGs without penalty.
|
||||
@@ -9406,7 +9406,7 @@ BOOLEAN ApplyClothes( SOLDIERTYPE * pSoldier, OBJECTTYPE * pObj, BOOLEAN fUseAPs
|
||||
pSoldier->bSoldierFlagMask |= SOLDIER_COVERT_SOLDIER;
|
||||
|
||||
if ( pSoldier->bTeam == OUR_TEAM )
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_DISGUISED_AS_SOLDIER], pSoldier->GetName() );
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_DISGUISED_AS_SOLDIER], pSoldier->GetName() );
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -9418,7 +9418,7 @@ BOOLEAN ApplyClothes( SOLDIERTYPE * pSoldier, OBJECTTYPE * pObj, BOOLEAN fUseAPs
|
||||
pSoldier->bSoldierFlagMask |= SOLDIER_COVERT_CIV;
|
||||
|
||||
if ( pSoldier->bTeam == OUR_TEAM )
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_DISGUISED_AS_CIVILIAN], pSoldier->GetName() );
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_DISGUISED_AS_CIVILIAN], pSoldier->GetName() );
|
||||
}
|
||||
|
||||
// reevaluate sight - otherwise we could hide by changing clothes in plain sight!
|
||||
@@ -13353,7 +13353,7 @@ INT16 GetWornStealth( SOLDIERTYPE * pSoldier )
|
||||
|
||||
// Add some default stealth ability to mercs with STEALTHY trait - SANDRO
|
||||
if ( gGameOptions.fNewTraitSystem && HAS_SKILL_TRAIT( pSoldier, STEALTHY_NT ))
|
||||
ttl += gSkillTraitValues.ubSTStealthBonus;
|
||||
ttl += gSkillTraitValues.ubSTStealthBonus;
|
||||
|
||||
ttl += pSoldier->GetBackgroundValue(BG_PERC_STEALTH);
|
||||
|
||||
@@ -13499,6 +13499,26 @@ INT16 GetAverageBestLaserRange( OBJECTTYPE * pObj )
|
||||
return( bonus );
|
||||
}
|
||||
|
||||
// get the best laser range from the weapon and attachments
|
||||
INT16 GetBestLaserRange( OBJECTTYPE * pObj )
|
||||
{
|
||||
INT16 range=0;
|
||||
|
||||
if (Item[pObj->usItem].bestlaserrange > 0)
|
||||
{
|
||||
range = Item[pObj->usItem].bestlaserrange;
|
||||
}
|
||||
for (attachmentList::iterator iter = (*pObj)[0]->attachments.begin(); iter != (*pObj)[0]->attachments.end(); ++iter)
|
||||
{
|
||||
if (Item[iter->usItem].bestlaserrange > range && iter->exists())
|
||||
{
|
||||
range = Item[iter->usItem].bestlaserrange;
|
||||
}
|
||||
}
|
||||
|
||||
return( range );
|
||||
}
|
||||
|
||||
// HEADROCK: This function determines the bipod bonii of the gun or its attachments
|
||||
INT16 GetBipodBonus( OBJECTTYPE * pObj )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user