Botpack
Class SawHit

source: e:\games\UnrealTournament\Botpack\Classes\SawHit.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Effects
         |
         +--Botpack.BulletImpact
            |
            +--Botpack.UT_WallHit
               |
               +--Botpack.SawHit
Direct Known Subclasses:None

class SawHit
extends Botpack.UT_WallHit

//============================================================================= // SawHit. //=============================================================================

Function Summary
 
simulated
SpawnEffects()
 
simulated
SpawnSound()



Source Code


00001	//=============================================================================
00002	// SawHit.
00003	//=============================================================================
00004	class SawHit extends UT_WallHit;
00005	
00006	simulated function SpawnSound()
00007	{
00008	}
00009	
00010	simulated function SpawnEffects()
00011	{
00012		local Actor A;
00013		local int j;
00014		local int NumSparks;
00015	
00016		NumSparks = rand(MaxSparks);
00017		for ( j=0; j<MaxChips; j++ )
00018			if ( FRand() < ChipOdds ) 
00019			{
00020				NumSparks--;
00021				A = spawn(class'Chip',,,Location + 8 * Vector(Rotation));
00022				if ( A != None )
00023					A.RemoteRole = ROLE_None;
00024			}
00025	
00026		if ( !Level.bHighDetailMode )
00027		{
00028			Destroy();
00029			return;
00030		}
00031		Spawn(class'WallCrack');
00032	
00033		A = Spawn(class'UT_SpriteSmokePuff',,,Location + 8 * Vector(Rotation));
00034		A.RemoteRole = ROLE_None;
00035		if ( Region.Zone.bWaterZone || Level.bDropDetail )
00036		{
00037			Destroy();
00038			return;
00039		}
00040		Spawn(class'UT_Sparks');
00041		if ( NumSparks > 0 ) 
00042			for (j=0; j<NumSparks; j++) 
00043				spawn(class'UT_Spark',,,Location + 8 * Vector(Rotation));
00044		Destroy();
00045	}
00046	
00047	defaultproperties
00048	{
00049	     MaxSparks=4
00050	     ChipOdds=0.700000
00051	}

End Source Code