1
0
KF2-Dev-Scripts/KFGameContent/Classes/KFDT_Ballistic_HRGTeslauncher.uc

80 lines
2.4 KiB
Ucode
Raw Permalink Normal View History

2020-12-13 15:01:13 +00:00
//=============================================================================
// KFDT_Ballistic_HRGIncendiaryRifle
//=============================================================================
//=============================================================================
// Killing Floor 2
// Copyright (C) 2019 Tripwire Interactive LLC
//=============================================================================
class KFDT_Ballistic_HRGTeslauncher extends KFDT_Microwave
abstract
hidedropdown;
// Damage type to use for the burning damage over time
var class<KFDamageType> BurnDamageType;
/** Allows the damage type to customize exactly which hit zones it can dismember */
static simulated function bool CanDismemberHitZone( name InHitZoneName )
{
/*if( super.CanDismemberHitZone( InHitZoneName ) )
{
return true;
}
switch ( InHitZoneName )
{
case 'lupperarm':
case 'rupperarm':
return true;
}*/
//remove from now because we dont know if we want to dismember zones
return false;
}
/** Play damage type specific impact effects when taking damage */
static function PlayImpactHitEffects(KFPawn P, vector HitLocation, vector HitDirection, byte HitZoneIndex, optional Pawn HitInstigator)
{
// Play burn effect when dead
if (P.bPlayedDeath && P.WorldInfo.TimeSeconds > P.TimeOfDeath)
{
default.BurnDamageType.static.PlayImpactHitEffects(P, HitLocation, HitDirection, HitZoneIndex, HitInstigator);
return;
}
super.PlayImpactHitEffects(P, HitLocation, HitDirection, HitZoneIndex, HitInstigator);
}
/** Called when damage is dealt to apply additional damage type (e.g. Damage Over Time) */
static function ApplySecondaryDamage(KFPawn Victim, int DamageTaken, optional Controller InstigatedBy)
{
// Overriden to specific a different damage type to do the burn damage over
// time. We do this so we don't get shotgun pellet impact sounds/fx during
// the DOT burning.
if (default.BurnDamageType.default.DoT_Type != DOT_None)
{
Victim.ApplyDamageOverTime(DamageTaken, InstigatedBy, default.BurnDamageType);
}
}
defaultproperties
{
KDamageImpulse=550
GibImpulseScale=0.85
KDeathUpKick=-200
KDeathVel=200
BurnPower = 8
MicrowavePower = 45
StumblePower=18
GunHitPower=30//0
WeaponDef=class'KFWeapDef_HRGTeslauncher'
//Perk
ModifierPerkList(0)=class'KFPerk_Berserker'
EffectGroup=FXG_MicrowaveProj
BurnDamageType=class'KFDT_Fire_HRGTeslauncherDoT'
}