KF2-Server-Extension/ServerExt/Classes/Ext_PerkSharpshooter.uc

49 lines
1.7 KiB
Ucode
Raw Normal View History

2017-10-20 02:00:49 +00:00
Class Ext_PerkSharpshooter extends Ext_PerkRhythmPerkBase;
var bool bHasDireReload;
var float ZEDTimeStunPower,DireReloadSpeed;
replication
{
// Things the server should send to the client.
2020-11-28 20:04:55 +00:00
if (true)
2017-10-20 02:00:49 +00:00
bHasDireReload;
}
simulated function float GetReloadRateScale(KFWeapon KFW)
{
2020-11-28 20:12:58 +00:00
if (bHasDireReload && PlayerOwner.Pawn!=None && PlayerOwner.Pawn.Health<40)
2017-10-20 02:00:49 +00:00
return Super.GetReloadRateScale(KFW)*DireReloadSpeed;
return Super.GetReloadRateScale(KFW);
}
2020-11-28 21:54:57 +00:00
2020-11-28 20:04:55 +00:00
function float GetStunPowerModifier(optional class<DamageType> DamageType, optional byte HitZoneIdx)
2017-10-20 02:00:49 +00:00
{
2020-11-28 20:12:58 +00:00
if (ZEDTimeStunPower>0 && HitZoneIdx==HZI_Head && WorldInfo.TimeDilation<1.f && (class<KFDamageType>(DamageType)!=None && class<KFDamageType>(DamageType).Default.ModifierPerkList.Find(BasePerk)>=0))
2017-10-20 02:00:49 +00:00
return Super.GetStunPowerModifier(DamageType,HitZoneIdx) + ZEDTimeStunPower;
return Super.GetStunPowerModifier(DamageType,HitZoneIdx);
}
defaultproperties
{
PerkIcon=Texture2D'UI_PerkIcons_TEX.UI_PerkIcon_Sharpshooter'
DefTraitList.Add(class'Ext_TraitWPSharp')
DefTraitList.Add(class'Ext_TraitRanger')
DefTraitList.Add(class'Ext_TraitDireReload')
DefTraitList.Add(class'Ext_TraitEliteReload')
BasePerk=class'KFPerk_Sharpshooter'
DefPerkStats(1)=(Progress=0.25)
DefPerkStats(19)=(bHiddenConfig=false)
2017-10-20 02:00:49 +00:00
PrimaryMelee=class'KFWeap_Knife_Sharpshooter'
PrimaryWeapon=class'KFWeap_Rifle_Winchester1894'
PerkGrenade=class'KFProj_FreezeGrenade'
2023-05-14 02:49:12 +00:00
2017-10-20 02:00:49 +00:00
PrimaryWeaponDef=class'KFWeapDef_Winchester1894'
KnifeWeaponDef=class'KFWeapDef_Knife_Sharpshooter'
GrenadeWeaponDef=class'KFWeapDef_Grenade_Sharpshooter'
2023-05-14 02:49:12 +00:00
2017-10-20 02:00:49 +00:00
AutoBuyLoadOutPath=(class'KFWeapDef_Winchester1894', class'KFWeapDef_Crossbow', class'KFWeapDef_M14EBR', class'KFWeapDef_RailGun')
2023-05-14 02:49:12 +00:00
2017-10-20 02:00:49 +00:00
DireReloadSpeed=0.25f
}