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

45 lines
1.3 KiB
Ucode
Raw Permalink Normal View History

2020-12-13 15:01:13 +00:00
//=============================================================================
// KFWeapAttach_IonThruster
//=============================================================================
//
//=============================================================================
// Killing Floor 2
// Copyright (C) 2019 Tripwire Interactive LLC
//=============================================================================
class KFWeapAttach_IonThruster extends KFWeaponAttachment;
/** Name of the special anim used for the ultimate attack */
var name UltimateAttackAnim;
/** Name of the special anim used for the ultimate attack while crouching */
var name UltimateAttackAnimCrouch;
/** Play a melee attack animation */
simulated function float PlayMeleeAtkAnim(EWeaponState NewWeaponState, KFPawn P)
{
if (P.IsFirstPerson())
{
return 0.0f;
}
// custom firemode, special attack
if (Instigator != none && Instigator.FiringMode == 6)
{
if (P.bIsCrouched)
{
return PlayCharacterMeshAnim(P, UltimateAttackAnimCrouch);
}
else
{
return PlayCharacterMeshAnim(P, UltimateAttackAnim);
}
}
return super.PlayMeleeAtkAnim(NewWeaponState, P);
}
defaultproperties
{
UltimateAttackAnim=Super_Attack
UltimateAttackAnimCrouch=Super_Attack_CH
}