KF Class SharpShooter headshots disabled

  • Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

***Stuxnet***

FNG / Fresh Meat
Hi! I have a problem with my class SharpShooter headshots no longer works with no arms! If anyone can help me solve this problem.


Code:
static function float GetHeadShotDamMulti(KFPlayerReplicationInfo KFPRI, KFPawn P, class<DamageType> DmgType)
{
    local float ret;

    // Removed extra SS Crossbow headshot damage in Round 1(added back in Round 2) and Removed Single/Dualies Damage for Hell on Earth in Round 6
    // Added Dual Deagles back in for Balance Round 7
    if ( DmgType == class'DamTypeCrossbow' || DmgType == class'DamTypeCrossbowHeadShot' || DmgType == class'DamTypeWinchester' ||
         DmgType == class'DamTypeDeagle' || DmgType == class'DamTypeDualDeagle' || DmgType == class'DamTypeM14EBR' ||
          DmgType == class'DamTypeMagnum44Pistol' || DmgType == class'DamTypeDual44Magnum'
          || DmgType == class'DamTypeMK23Pistol' || DmgType == class'DamTypeDualMK23Pistol'
          || DmgType == class'DamTypeM99SniperRifle' || DmgType == class'DamTypeM99HeadShot' ||
          DmgType == class'DamTypeSPSniper' || DmgType == class'DamTypeDualies' || DmgType == class'DamTypeDualiesPistol9mmNinemm' )
        
    {
        if ( KFPRI.ClientVeteranSkillLevel <= 3 )
        {
            ret = 1.05 + (0.05 * float(KFPRI.ClientVeteranSkillLevel));
        }
        else if ( KFPRI.ClientVeteranSkillLevel == 4 )
        {
            ret = 1.30;
        }
        else if ( KFPRI.ClientVeteranSkillLevel == 5 )
        {
            ret = 1.50;
        }
        else if ( KFPRI.ClientVeteranSkillLevel <= 6 )
        {
            ret = 1.60; // 60% increase in Crossbow/Winchester/Handcannon damage
        }
        else
        {
            ret = 1.3 + (0.05 * float(KFPRI.ClientVeteranSkillLevel));
        }
    }
}
 

Skell

Active member
Mar 21, 2013
1,245
2
38
On the Internet.
Hi! I have a problem with my class SharpShooter headshots no longer works with no arms! If anyone can help me solve this problem.


Code:
static function float GetHeadShotDamMulti(KFPlayerReplicationInfo KFPRI, KFPawn P, class<DamageType> DmgType)
{
    local float ret;

    // Removed extra SS Crossbow headshot damage in Round 1(added back in Round 2) and Removed Single/Dualies Damage for Hell on Earth in Round 6
    // Added Dual Deagles back in for Balance Round 7
    if ( DmgType == class'DamTypeCrossbow' || DmgType == class'DamTypeCrossbowHeadShot' || DmgType == class'DamTypeWinchester' ||
         DmgType == class'DamTypeDeagle' || DmgType == class'DamTypeDualDeagle' || DmgType == class'DamTypeM14EBR' ||
          DmgType == class'DamTypeMagnum44Pistol' || DmgType == class'DamTypeDual44Magnum'
          || DmgType == class'DamTypeMK23Pistol' || DmgType == class'DamTypeDualMK23Pistol'
          || DmgType == class'DamTypeM99SniperRifle' || DmgType == class'DamTypeM99HeadShot' ||
          DmgType == class'DamTypeSPSniper' || DmgType == class'DamTypeDualies' || DmgType == class'DamTypeDualiesPistol9mmNinemm' )
        
    {
        if ( KFPRI.ClientVeteranSkillLevel <= 3 )
        {
            ret = 1.05 + (0.05 * float(KFPRI.ClientVeteranSkillLevel));
        }
        else if ( KFPRI.ClientVeteranSkillLevel == 4 )
        {
            ret = 1.30;
        }
        else if ( KFPRI.ClientVeteranSkillLevel == 5 )
        {
            ret = 1.50;
        }
        else if ( KFPRI.ClientVeteranSkillLevel <= 6 )
        {
            ret = 1.60; // 60% increase in Crossbow/Winchester/Handcannon damage
        }
        else
        {
            ret = 1.3 + (0.05 * float(KFPRI.ClientVeteranSkillLevel));
        }
    }
}

ret isn't being returned so the multiplier is defaulting 0.f .