Class TentElderProj extends TentacleProjectile; #if GAMEVER==227 var XEmitter MyEmitter[2]; simulated function PostBeginPlay() { if( Level.NetMode!=NM_DedicatedServer ) { if( MyEmitter[0]==None ) MyEmitter[0] = Spawn(Class'TentElderProjTrlFX',Self); if( Level.bHighDetailMode && MyEmitter[1]==None ) MyEmitter[1] = Spawn(Class'TentElderProjFX',Self); } } simulated function Destroyed() { if( MyEmitter[0]!=None ) MyEmitter[0].Kill(); if( MyEmitter[1]!=None ) MyEmitter[1].Kill(); } #else simulated function PostBeginPlay(); #endif auto state Flying { simulated function ProcessTouch (Actor Other, Vector HitLocation) { if( Tentacle(Other)==None ) { if ( Other.Role==ROLE_Authority ) Other.TakeDamage(Damage, Instigator, HitLocation, MomentumTransfer * Normal(Velocity), 'shot'); Destroy(); } } simulated function Landed( vector HitNormal ) { HitWall(HitNormal,Base); } simulated function Tick( float Delta ) { SetRotation(rotator(Velocity)); } simulated function Explode(vector HitLocation, vector HitNormal) { local SmallSpark2 s; if( Level.NetMode!=NM_DedicatedServer ) { PlaySound(ImpactSound); s = spawn(class'SmallSpark2',,,HitLocation+HitNormal*5,rotator(HitNormal*2+VRand())); s.RemoteRole = ROLE_None; } if( Physics==PHYS_Falling ) Destroy(); else { MakeNoise(1.0); Velocity = MirrorVectorByNormal(Velocity,HitNormal)*0.4+(VRand()*Speed*0.2); SetPhysics(PHYS_Falling); Damage*=0.5; MomentumTransfer*=0.4; #if GAMEVER==227 if( MyEmitter[1]!=None ) { MyEmitter[1].Kill(); MyEmitter[1] = None; } #endif } } function BeginState() { Velocity = Vector(Rotation) * Speed; PlaySound(SpawnSound,,,,,1.6f); } } defaultproperties { speed=3000.000000 MaxSpeed=3000.000000 Damage=38.000000 MomentumTransfer=50000 DrawScale=0.6 bBounce=true }