Botpack
Class CatapultRock

source: e:\games\UnrealTournament\Botpack\Classes\CatapultRock.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Projectile
         |
         +--UnrealI.BigRock
            |
            +--Botpack.CatapultRock
Direct Known Subclasses:None

class CatapultRock
extends UnrealI.BigRock

//============================================================================= // CatapultRock. //=============================================================================
States
Flying
State Flying Function Summary
 void ProcessTouch(Actor Other, Vector HitLocation)



Source Code


00001	//=============================================================================
00002	// CatapultRock.
00003	//=============================================================================
00004	class CatapultRock extends BigRock;
00005	
00006	auto state Flying
00007	{
00008		function ProcessTouch (Actor Other, Vector HitLocation)
00009		{
00010			local int hitdamage;
00011	
00012			PlaySound(ImpactSound, SLOT_Interact, DrawScale/10);	
00013	
00014			if ( !Other.IsA('BigRock') )
00015			{
00016				Hitdamage = Damage * 0.00002 * (DrawScale**3) * speed;
00017				if ( (HitDamage > 6) && (speed > 150) )
00018					Other.TakeDamage(hitdamage, instigator,HitLocation,
00019						(35000.0 * Normal(Velocity)), 'crushed' );
00020			}
00021		}
00022	
00023	Begin:
00024		SetPhysics(PHYS_Falling);
00025	}
00026	
00027	defaultproperties
00028	{
00029	     DrawScale=8.500000
00030	}

End Source Code