# SFWeapon.HardWaveWave

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 00103 00104 00105 00106 00107 00108 |
    //=============================================================================
    // Spatial Fear
    // Class: HardWaveWave
    // Descripton: Forgot the SF in front, but who cares. Implements the shock wave
    //				that is emitted from the HardWave's secondary fire action.
    //
    // Author: Markus Nuebel
    //=============================================================================
    class HardWaveWave extends Effects;

    #exec MESH IMPORT MESH=HardWaveAltFire ANIVFILE=MODELS\HardWaveAltFire_a.3d DATAFILE=MODELS\HardWaveAltFire_d.3d X=0 Y=0 Z=0
    #exec MESH ORIGIN MESH=HardWaveAltFire X=0 Y=0 Z=0 YAW=64

    #exec MESH SEQUENCE MESH=HardWaveAltFire SEQ=All STARTFRAME=0 NUMFRAMES=10
    #exec MESH SEQUENCE MESH=HardWaveAltFire SEQ=Explo STARTFRAME=0 NUMFRAMES=10

    #exec MESHMAP NEW MESHMAP=HardWaveAltFire MESH=HardWaveAltFire
    //#exec MESHMAP scale MESHMAP=HardWaveAltFire X=0.025 Y=0.05 Z=0.1
    #exec MESHMAP scale MESHMAP=HardWaveAltFire X=0.05 Y=0.05 Z=0.1

    #exec MESHMAP SETTEXTURE MESHMAP=HardWaveAltFire NUM=1 TEXTURE=SFHWWAVE

    var float OldShockDistance, ShockSize;
    var int ICount;
    var bool m_bMaxScale;

    simulated function Tick( float DeltaTime )
    {
    	if ( Level.NetMode != NM_DedicatedServer )
    	{
    		ShockSize =  58 * (Default.LifeSpan - LifeSpan) + 1.5/(LifeSpan/Default.LifeSpan+0.05);
    		if(!m_bMaxScale)
    		{
    			DrawScale = ShockSize;
    			ScaleGlow = 1;
    			Velocity = Velocity*1500*(Default.LifeSpan - LifeSpan);     // Impart ONLY forward vel
    		}
    		else
    		{
    			ScaleGlow = Lifespan*2;
    			Velocity = 2*Velocity;
    		}

    		AmbientGlow = ScaleGlow * 255;
    //      DrawScale=1.0f;
    //		ScaleGlow=255;
    	}
    }
    function AnimEnd()
    {
    	m_bMaxScale=true;
    //	Destroy();
    }
    simulated function PostBeginPlay()
    {
    	local	Pawn P;
    	local	vector X, Y, Z;

    	if ( Role == ROLE_Authority )
    	{
    		if ( Instigator != None )
    		{
    			MakeNoise(10.0);
    			GetAxes(Instigator.ViewRotation, X,Y,Z);
    			Velocity  = X;
    			SetRotation(Instigator.ViewRotation);
    		}
    	}

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

    }

    simulated function SpawnEffects()
    {
    	 local WarExplosion W;

    	 PlaySound(Sound'Expl03', SLOT_Interface, 16.0);
    	 PlaySound(Sound'Expl03', SLOT_None, 16.0);
    	 PlaySound(Sound'Expl03', SLOT_Misc, 16.0);
    	 PlaySound(Sound'Expl03', SLOT_Talk, 16.0);
    }

    //	MultiSkins(1)=FireTexture'UnrealShare.Effect51.MyTex3'
    // 	Mesh=LodMesh'Botpack.ShockWavem'
    //	MultiSkins(1)=FireTexture'k_GorillaTex.FX.sfhwwave'

    defaultproperties
    {
         bAlwaysRelevant=True
         Physics=PHYS_Projectile
         RemoteRole=ROLE_SimulatedProxy
         LifeSpan=0.450000
         DrawType=DT_Mesh
         Style=STY_Translucent
         Texture=FireTexture'Botpack.ShaneFx.Sides'
         Mesh=LodMesh'SFWeapon.HardWaveAltFire'
         AmbientGlow=255
         bUnlit=True
         MultiSkins(1)=FireTexture'Botpack.ShaneFx.Sides'
    }

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