XIII
Class BazookRocket

source: C:\XIII\XIII\Classes\BazookRocket.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Projectile
         |
         +--XIII.XIIIProjectile
            |
            +--XIII.BazookRocket
Direct Known Subclasses:None

class BazookRocket
extends XIII.XIIIProjectile

//----------------------------------------------------------- // //-----------------------------------------------------------
Variables
 rotator rHit


Function Summary
 
simulated
Explode(vector HitLocation, vector HitNormal)
     
//_____________________________________________________________________________
 
simulated
PostBeginPlay()
     
//_____________________________________________________________________________
// Set up speed
 
simulated
Timer()
     
//_____________________________________________________________________________



Source Code


00001	//-----------------------------------------------------------
00002	//
00003	//-----------------------------------------------------------
00004	class BazookRocket extends XIIIProjectile;
00005	
00006	var rotator rHit;
00007	
00008	//_____________________________________________________________________________
00009	// Set up speed
00010	simulated function PostBeginPlay()
00011	{
00012	//    Log("--> Spawn projectile"@self); // ::DBUG::
00013	    Super.PostBeginPlay();
00014	    Velocity = Vector(Rotation) * Speed;
00015	
00016	    MyTrail = Spawn(MyTrailClass,self,,Location);
00017	    MyTrail.Init();
00018	}
00019	
00020	//_____________________________________________________________________________
00021	simulated function Timer()
00022	{
00023	    if ( bSpawnDecal && (ExplosionDecal != None) && (Level.NetMode != NM_DedicatedServer) )
00024	      Spawn(ExplosionDecal,self,,Location, rHit);
00025	    destroy();
00026	}
00027	
00028	//_____________________________________________________________________________
00029	simulated function Explode(vector HitLocation, vector HitNormal)
00030	{
00031	    Local FragmentExplo Frag;
00032	    Local int i, FragLoop;
00033	
00034	    BlowUp(HitLocation + 50*HitNormal);
00035	    if ( Level.NetMode != NM_DedicatedServer )
00036	    {
00037	      Spawn(ExplosionEmitterClass,,,HitLocation + HitNormal*50 - vector(rotation)*150,rotator(HitNormal));
00038	      if ( (Level.Game != none) && (Level.Game.DetailLevel > 1) )
00039	        FragLoop = 6;
00040	      else
00041	        FragLoop = 3;
00042	      for(i = 0; i < FragLoop ; i++)
00043	      {
00044	        Frag = Spawn(class'FragmentExplo',self,, HitLocation + HitNormal*50 - vector(rotation)*150,rotator(HitNormal));
00045	        Frag.Velocity = (vRand())*(400+fRand()*200);
00046	      }
00047	      if ( PhysicsVolume.bWaterVolume )
00048	      {
00049	        SpawnWaterExplo(HitLocation);
00050	      }
00051	    }
00052	    rHit = rotator(-HitNormal);
00053	    SetPhysics(PHYS_None);
00054	    Velocity = vect(0,0,0);
00055	    bHidden = true;
00056	    RefreshDisplaying();
00057	    SetTimer(0.8, false);
00058	}
00059	
00060	
00061	defaultproperties
00062	{
00063	     hExploSound=Sound'XIIIsound.Explo__ExploBaz.ExploBaz__hExploBaz'
00064	     MyTrailClass=Class'XIII.BazookRocketTrail'
00065	     StaticMeshName="MeshArmesPickup.RocketIA"
00066	     ShakeMag=900.000000
00067	     shaketime=7.000000
00068	     ShakeVert=(X=5.000000,Y=10.000000,Z=-25.000000)
00069	     ShakeSpeed=(X=300.000000,Y=300.000000,Z=300.000000)
00070	     ShakeCycles=2.000000
00071	     ExplosionEmitterClass=Class'XIII.BazookExplosionEmitter'
00072	     Speed=2000.000000
00073	     MaxSpeed=4000.000000
00074	     Damage=600.000000
00075	     DamageRadius=1000.000000
00076	     MomentumTransfer=80000.000000
00077	     MyDamageType=Class'XIII.DTRocketed'
00078	     ExplosionDecal=Class'XIII.BazookBlast'
00079	     DrawType=DT_StaticMesh
00080	     LifeSpan=6.000000
00081	     SaturationDistance=600.000000
00082	     StabilisationDistance=3500.000000
00083	     StabilisationVolume=-10.000000
00084	}

End Source Code