# SFWeapon.SFRapidEddySphere

00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 |
    //=============================================================================
    // Spatial Fear
    // Class: SFRapidEddySphere
    // Descripton: Effect use by Rapid Eddy's primary fire.
    //				Sphere around the hit target.
    //
    // Author: Markus Nuebel
    //=============================================================================
    class SFRapidEddySphere extends Effects;

    #exec OBJ LOAD FILE=k_GorillaTex.utx PACKAGE=k_GorillaTex GROUP=FX
    #exec OBJ LOAD FILE=SPF-Content.uax  PACKAGE=SPF-Content GROUP=Weapons

    var float 	m_fRadius;
    var int 	FatnessOffset;

    simulated function Tick( float DeltaTime )
    {
    	local int IdealFatness;

    	// Existance
    	if(None == Owner)
    		Destroy();

    	// Fading
    	if ( Level.NetMode != NM_DedicatedServer )
    	{
    		ScaleGlow = (Lifespan/Default.Lifespan);
    		AmbientGlow = ScaleGlow * 255;
    	}

    	// Size
    	if ( bHidden || (Level.NetMode == NM_DedicatedServer) || (Owner == None) )
    	{
    		Disable('Tick');
    		return;
    	}

    	SetLocation(Owner.Location);
    /*
    	IdealFatness = Owner.Fatness; // Convert to int for safety.
    	IdealFatness += FatnessOffset;

    	if ( Fatness > IdealFatness )
    		Fatness = Max(IdealFatness, Fatness - 130 * DeltaTime);
    	else
    		Fatness = Min(IdealFatness, 255);
    */
    	// Call to base class
    	Super.Tick(DeltaTime);

    }

    simulated function PostBeginPlay()
    {

    	local float	fValue1, fValue2;

    	if ( Level.NetMode != NM_DedicatedServer )
    	{
    		PlayAnim( 'Explosion', 0.25 );
    		SpawnEffects();
    	}

    	if ( Instigator != None )
    	{
    		MakeNoise(0.5);
    		fValue1		= Owner.CollisionHeight / m_fRadius;
    		fValue2		= Owner.CollisionRadius / m_fRadius;
    		DrawScale	= FMax(fValue1, fValue2);
    	}
    }

    simulated function SpawnEffects()
    {
    	local actor a;

    	 a = Spawn(class'EffectLight');
    	 a.RemoteRole = ROLE_None;
    	 a = Spawn(class'ParticleBurst2');
    	 a.RemoteRole = ROLE_None;
    }

    defaultproperties
    {
         m_fRadius=600.000000
         bAlwaysRelevant=True
         RemoteRole=ROLE_SimulatedProxy
         LifeSpan=0.800000
         AmbientSound=Sound'SPF-Content.Weapons.EddyPawnImpact'
         DrawType=DT_Mesh
         Style=STY_Translucent
         Texture=None
         Mesh=LodMesh'Botpack.ShockWavem'
         ScaleGlow=1.100000
         bUnlit=True
         MultiSkins(1)=FireTexture'k_GorillaTex.FX.B9_SHOT2'
    }

class file time: 12/7/2003 3:58:26 PM - creation time: 12/7/2003 4:03:45 PM
Created with UnCodeX