- Code: Select all
//=============================================================================
// FireGrenade.
//=============================================================================
class FireGrenade expands HandGrenade;
auto simulated state Flying
{
simulated function Explode(vector HitLocation, vector HitNormal)
{
local ShockRing ring;
local DeusExPlayer player,jd;
local float dist;
local FlameSpawn S;
player = DeusExPlayer(Owner);
foreach RadiusActors(class'DeusExPlayer',jd,512,location)
{
dist = Abs(VSize(jd.Location - Location));
if (dist ~= 0)
dist = 10.0;
else
dist = 2.0 * FClamp(blastRadius/dist, 0.0, 4.0);
jd.ClientFlash(1.0, vect(100,50,0));
jd.TakeDamage(35,DeusExPlayer(Owner),Location,vect(0,0,0),'Flamed');
dist=0.0;
}
S=Spawn(class'FlameSpawn',,,Location+vect(0,0,96));
S.SetOwner(DeusExPlayer(Owner));
S.DrawScale=2;
PlayImpactSound();
if ( AISoundLevel > 0.0 )
AISendEvent('LoudNoise', EAITYPE_Audio, 2.0, AISoundLevel*blastRadius*16);
Destroy();
}
}
defaultproperties
{
MultiSkins=Texture'Skins.IncGrenade'
}
How can you use Deusexplayer(Owner);??? I don't see Owner anywhere?