30 lines
976 B
Ucode
30 lines
976 B
Ucode
class NiceBloatVomit extends KFBloatVomit;
|
|
|
|
// limit how much you can damage zeds
|
|
const DAMAGECOUNT=10;
|
|
var private transient int DamageTicked;
|
|
|
|
auto state Flying {
|
|
simulated function ProcessTouch(Actor Other, Vector HitLocation) {
|
|
// add damage limit
|
|
if (DamageTicked >= DAMAGECOUNT) {
|
|
BlowUp(HitLocation);
|
|
return;
|
|
}
|
|
if (ExtendedZCollision(Other) != none) {
|
|
return;
|
|
}
|
|
if (
|
|
Other != Instigator &&
|
|
(Other.IsA('Pawn') || Other.IsA('DestroyableObjective') || Other.bProjTarget)
|
|
) {
|
|
DamageTicked += 1;
|
|
// warn("DamageTicked: " $ DamageTicked);
|
|
// use server DelayedHurtRadius() instead?
|
|
HurtRadius(Damage, DamageRadius, MyDamageType, MomentumTransfer, HitLocation);
|
|
}
|
|
else if (Other != Instigator && Other.bBlockActors) {
|
|
HitWall(Normal(HitLocation - Location), Other);
|
|
}
|
|
}
|
|
} |