UnrealShare
Class ThrownBody

source: e:\games\UnrealTournament\UnrealShare\Classes\thrownbody.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Decoration
         |
         +--Engine.Carcass
            |
            +--UnrealShare.CreatureCarcass
               |
               +--UnrealShare.HumanCarcass
                  |
                  +--UnrealShare.DeadMales
                     |
                     +--UnrealShare.MaleBody
                        |
                        +--UnrealShare.ThrownBody
Direct Known Subclasses:None

class ThrownBody
extends UnrealShare.MaleBody

//============================================================================= // ThrownBody. //=============================================================================

Function Summary
 void HitWall(vector HitNormal, Actor Wall)
 void Landed(vector HitNormal)
 void TakeDamage(int Damage, Pawn InstigatedBy, Vector Hitlocation, Vector Momentum, name DamageType)



Source Code


00001	//=============================================================================
00002	// ThrownBody.
00003	//=============================================================================
00004	class ThrownBody extends MaleBody;
00005	
00006	#exec AUDIO IMPORT FILE="Sounds\Male\injurL04.WAV" NAME="MInjur2" GROUP="Male"
00007	
00008		function TakeDamage( int Damage, Pawn InstigatedBy, Vector Hitlocation, 
00009								Vector Momentum, name DamageType)
00010		{	
00011			if ( DamageType == 'exploded' )
00012				ChunkUp(Damage);
00013		}
00014	
00015		function HitWall(vector HitNormal, actor Wall)
00016		{
00017		
00018			DesiredRotation.Pitch = 0;
00019			DesiredRotation.Roll = 0;
00020			bRotateToDesired = true;
00021	
00022			Spawn(class 'Bloodspurt',,,,Rotator(HitNormal));
00023			PlaySound(sound'MInjur2', SLOT_None, 8);
00024			TweenAnim('Slump2', 0.25);
00025			Velocity = 0.7 * (Velocity - 2 * HitNormal * (Velocity Dot HitNormal));
00026			Velocity.Z *= 0.9;
00027			bBounce = false;
00028			Disable('HitWall');
00029		}
00030		
00031		function Landed(vector HitNormal)
00032		{
00033			SetPhysics(PHYS_Rotating);
00034		 	SetCollision(bCollideActors, false, false);
00035			if ( HitNormal.Z < 0.99 )
00036				ReducedHeightFactor = 0.1;
00037			if ( HitNormal.Z < 0.93 )
00038				ReducedHeightFactor = 0.0;
00039			if ( !IsAnimating() )
00040				LieStill();
00041		}
00042	
00043	defaultproperties
00044	{
00045	     bPushable=True
00046	     AnimSequence=Hang2
00047	     Rotation=(Pitch=8000)
00048	     RotationRate=(Pitch=80000)
00049	}

End Source Code