Code: Select all
function PlayTakeHit(float tweentime, vector HitLoc, int damage)
{
local carcass carc;
local LeglessKrall rep;
local pawn OtherPawn;
if ( (Health > 30) || (damage < 24) || (HitLoc.Z > Location.Z) || (FRand() < 0.6) || Level.Game.bVeryLowGore )
{
Super.PlayTakeHit(tweentime, HitLoc, damage);
return;
}
carc = Spawn(class 'CreatureChunks',,, Location - CollisionHeight * vect(0,0,0.5), Rotation + rot(3000,0,16384) );
if (carc != None)
{
carc.Mesh = mesh'KrallFoot';
carc.Initfor(self);
carc.Velocity = Velocity + VSize(Velocity) * VRand();
carc.Velocity.Z = FMax(carc.Velocity.Z, Velocity.Z);
}
carc = Spawn(class 'CreatureChunks',,, Location - CollisionHeight * vect(0,0,0.5), Rotation + rot(3000,0,16384) );
if (carc != None)
{
carc.Mesh = mesh'KrallFoot';
carc.Initfor(self);
carc.Velocity = Velocity + VSize(Velocity) * VRand();
carc.Velocity.Z = FMax(carc.Velocity.Z, Velocity.Z);
}
SetCollision(false, false, false);
OtherPawn = Level.PawnList;
while ( OtherPawn != None )
{
OtherPawn.Killed(enemy, self, '');
OtherPawn = OtherPawn.nextPawn;
}
if ( CarriedDecoration != None )
DropDecoration();
TriggerEvent(Event,Self,Enemy);
Level.Game.DiscardInventory(self);
Velocity.Z *= 1.3;
rep = Spawn(class'LeglessKrall');
if (rep!=none)
rep.InitFor(self);
destroy();
}What am I missing?
