Botpack
Class UT_HeavyWallHitEffect

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

class UT_HeavyWallHitEffect
extends Botpack.UT_WallHit

//============================================================================= // UT_HeavyWallHitEffect. //=============================================================================

Function Summary
 
simulated
SpawnEffects()
 
simulated
SpawnSound()



Source Code


00001	//=============================================================================
00002	// UT_HeavyWallHitEffect.
00003	//=============================================================================
00004	class UT_HeavyWallHitEffect extends UT_WallHit;
00005	
00006	
00007	simulated function SpawnSound()
00008	{
00009		local float decision;
00010	
00011		decision = FRand();
00012		if ( decision < 0.5 ) 
00013			PlaySound(sound'ricochet',, 4,,1200, 0.5+FRand());		
00014		else if ( decision < 0.75 )
00015			PlaySound(sound'Impact1',, 4,,1000);
00016		else
00017			PlaySound(sound'Impact2',, 4,,1000);
00018	}
00019	
00020	simulated function SpawnEffects()
00021	{
00022		local Actor A;
00023		local int j;
00024		local int NumSparks;
00025		local vector Dir;
00026	
00027		SpawnSound();
00028	
00029		NumSparks = rand(MaxSparks);
00030		for ( j=0; j<MaxChips; j++ )
00031			if ( FRand() < ChipOdds ) 
00032			{
00033				NumSparks--;
00034				A = spawn(class'Chip');
00035				if ( A != None )
00036					A.RemoteRole = ROLE_None;
00037			}
00038	
00039		Dir = Vector(Rotation);
00040		if ( !Level.bHighDetailMode )
00041			return;
00042		Spawn(class'Pock');
00043		A = Spawn(class'UT_SpriteSmokePuff',,,Location + 8 * Vector(Rotation));
00044		A.RemoteRole = ROLE_None;
00045		if ( Region.Zone.bWaterZone || Level.bDropDetail )
00046			return;
00047		if ( FRand() < 0.4 )
00048			Spawn(class'UT_Sparks');
00049		if ( NumSparks > 0 ) 
00050			for (j=0; j<NumSparks; j++) 
00051				spawn(class'UT_Spark',,,Location + 8 * Vector(Rotation));
00052	}
00053	
00054	defaultproperties
00055	{
00056	     MaxSparks=4
00057	     ChipOdds=0.500000
00058	}

End Source Code