2017-10-20 02:00:49 +00:00
|
|
|
// Written by Marco.
|
|
|
|
class ExtProj_SUPERMedGrenade extends KFProj_MedicGrenade
|
|
|
|
hidedropdown;
|
|
|
|
|
|
|
|
var() byte NumClusters;
|
|
|
|
|
|
|
|
simulated function Disintegrate( rotator inDisintegrateEffectRotation ); // Nope!
|
|
|
|
|
|
|
|
simulated function TriggerExplosion(Vector HitLocation, Vector HitNormal, Actor HitActor)
|
|
|
|
{
|
|
|
|
local byte i;
|
|
|
|
local KFProj_MedicGrenade P;
|
|
|
|
|
|
|
|
if( bHasExploded )
|
|
|
|
return;
|
|
|
|
if( InstigatorController==None && WorldInfo.NetMode!=NM_Client ) // Prevent Team-Kill.
|
|
|
|
{
|
|
|
|
Destroy();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
Super.TriggerExplosion(HitLocation,HitNormal,HitActor);
|
|
|
|
if( WorldInfo.NetMode!=NM_Client )
|
|
|
|
{
|
|
|
|
for( i=0; i<NumClusters; ++i )
|
|
|
|
{
|
|
|
|
P = Spawn(class'KFProj_MedicGrenade',,,Location);
|
|
|
|
if( P!=None )
|
|
|
|
{
|
|
|
|
P.InstigatorController = InstigatorController;
|
|
|
|
P.Init(VRand());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
bHasExploded = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
simulated function Destroyed()
|
|
|
|
{
|
2020-11-28 19:53:57 +00:00
|
|
|
local Actor HitActor;
|
|
|
|
local vector HitLocation, HitNormal;
|
2017-10-20 02:00:49 +00:00
|
|
|
|
|
|
|
// Final Failsafe check for explosion effect
|
|
|
|
if( !bHasExploded && WorldInfo.NetMode==NM_Client )
|
|
|
|
{
|
|
|
|
GetExplodeEffectLocation(HitLocation, HitNormal, HitActor);
|
2020-11-28 19:53:57 +00:00
|
|
|
TriggerExplosion(HitLocation, HitNormal, HitActor);
|
2017-10-20 02:00:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
defaultproperties
|
|
|
|
{
|
|
|
|
bCanDisintegrate=false
|
|
|
|
DrawScale=2
|
|
|
|
NumClusters=5
|
|
|
|
ProjFlightTemplate=ParticleSystem'ZED_Hans_EMIT.FX_Grenade_Explosive_01'
|
|
|
|
|
|
|
|
Begin Object Name=ExploTemplate0
|
|
|
|
Damage=170
|
|
|
|
DamageRadius=800
|
|
|
|
End Object
|
|
|
|
}
|