Add mechanic that buffs clots from the siren's scream

Increase their speed by 50% and tankiness by not receving any body
damage upon decapitation while under the effects.
This commit is contained in:
Anton Tarasenko 2024-10-29 03:57:46 +07:00
parent a003061d6d
commit 324e644db4
2 changed files with 31 additions and 0 deletions

View File

@ -5,6 +5,8 @@ class NiceZombieClot extends NiceZombieClotBase;
#exec OBJ LOAD FILE=KF_Specimens_Trip_T.utx
#exec OBJ LOAD FILE=MeanZedSkins.utx
var float sirenBoostTimeout;
function ClawDamageTarget()
{
local vector PushDir;
@ -109,9 +111,33 @@ simulated function int DoAnimAction( name AnimName )
}
return super.DoAnimAction( AnimName );
}
function DealDecapDamage( int damage,
Pawn instigatedBy,
Vector hitLocation,
Vector momentum,
class<NiceWeaponDamageType> damageType,
float headshotLevel,
KFPlayerReplicationInfo KFPRI,
optional float lockonTime) {
if (sirenBoostTimeout > 0) {
RemoveHead();
} else {
super.DealDecapDamage(damage, instigatedBy, hitLocation, momentum,
damageType, headshotLevel, KFPRI, lockonTime);
}
}
simulated function UpdateGroundSpeed() {
super.UpdateGroundSpeed();
if (sirenBoostTimeout > 0) {
groundSpeed *= 1.5;
}
}
simulated function Tick(float DeltaTime)
{
super.Tick(DeltaTime);
if (sirenBoostTimeout >= 0) {
sirenBoostTimeout -= deltaTime;
}
if( bShotAnim && Role == ROLE_Authority )
{
if( LookTarget!=none )

View File

@ -226,6 +226,7 @@ simulated function HurtRadius(float DamageAmount, float DamageRadius, class<Dama
local int UsedDamageAmount;
local KFHumanPawn humanPawn;
local class<NiceVeterancyTypes> niceVet;
local NiceZombieClot niceClot;
if (bHurtEntry || Health <= 0 || HeadHealth <= 0 || bIsStunned)
return;
@ -243,6 +244,10 @@ simulated function HurtRadius(float DamageAmount, float DamageRadius, class<Dama
if (Victims.bStatic || Victims.Physics == PHYS_None || !FastTrace(Victims.Location, Location) )
continue; // skip this actor
niceClot = NiceZombieClot(victims);
if (niceClot != none) {
niceClot.sirenBoostTimeout = 10.0;
}
Momentum = InitMomentum;
// don't let blast damage affect fluid - VisibleCollisingActors doesn't really work for them - jag
// Or Karma actors in this case. Self inflicted Death due to flying chairs is uncool for a zombie of your stature.