Botpack
Class TournamentFemale

source: e:\games\UnrealTournament\Botpack\Classes\TournamentFemale.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Pawn
         |
         +--Engine.PlayerPawn
            |
            +--Botpack.TournamentPlayer
               |
               +--Botpack.TournamentFemale
Direct Known Subclasses:TFemale1, TFemale2

class TournamentFemale
extends Botpack.TournamentPlayer

//============================================================================= // TournamentFemale. //=============================================================================

Function Summary
 void PlayDecap()
 void PlayDying(name DamageType, vector HitLoc)
 void PlayRightHit(float tweentime)



Source Code


00001	//=============================================================================
00002	// TournamentFemale.
00003	//=============================================================================
00004	class TournamentFemale extends TournamentPlayer
00005		abstract;
00006	
00007	#exec OBJ LOAD FILE=..\Sounds\FemaleSounds.uax PACKAGE=Botpack.FemaleSounds
00008	
00009	#exec TEXTURE IMPORT NAME=Woman FILE=TEXTURES\HUD\IFem2.PCX GROUP="Icons" MIPS=OFF
00010	#exec TEXTURE IMPORT NAME=WomanBelt FILE=TEXTURES\HUD\IFemSBelt.PCX GROUP="Icons" MIPS=OFF
00011	
00012	function PlayRightHit(float tweentime)
00013	{
00014		if ( AnimSequence == 'RightHit' )
00015			TweenAnim('GutHit', tweentime);
00016		else
00017			TweenAnim('RightHit', tweentime);
00018	}	
00019	
00020	function PlayDying(name DamageType, vector HitLoc)
00021	{
00022		local carcass carc;
00023	
00024		BaseEyeHeight = Default.BaseEyeHeight;
00025		PlayDyingSound();
00026				
00027		if ( DamageType == 'Suicided' )
00028		{
00029			PlayAnim('Dead3',, 0.1);
00030			return;
00031		}
00032	
00033		// check for head hit
00034		if ( (DamageType == 'Decapitated') && !class'GameInfo'.Default.bVeryLowGore )
00035		{
00036			PlayDecap();
00037			return;
00038		}
00039	
00040		if ( FRand() < 0.15 )
00041		{
00042			PlayAnim('Dead7',,0.1);
00043			return;
00044		}
00045	
00046		// check for big hit
00047		if ( (Velocity.Z > 250) && (FRand() < 0.75) )
00048		{
00049			if ( (HitLoc.Z < Location.Z) && !class'GameInfo'.Default.bVeryLowGore && (FRand() < 0.6) )
00050			{
00051				PlayAnim('Dead5',,0.05);
00052				if ( Level.NetMode != NM_Client )
00053				{
00054					carc = Spawn(class 'UT_FemaleFoot',,, Location - CollisionHeight * vect(0,0,0.5));
00055					if (carc != None)
00056					{
00057						carc.Initfor(self);
00058						carc.Velocity = Velocity + VSize(Velocity) * VRand();
00059						carc.Velocity.Z = FMax(carc.Velocity.Z, Velocity.Z);
00060					}
00061				}
00062			}
00063			else
00064				PlayAnim('Dead2',, 0.1);
00065			return;
00066		}
00067	
00068		// check for repeater death
00069		if ( (Health > -10) && ((DamageType == 'shot') || (DamageType == 'zapped')) )
00070		{
00071			PlayAnim('Dead9',, 0.1);
00072			return;
00073		}
00074			
00075		if ( (HitLoc.Z - Location.Z > 0.7 * CollisionHeight) && !class'GameInfo'.Default.bVeryLowGore )
00076		{
00077			if ( FRand() < 0.5 )
00078				PlayDecap();
00079			else
00080				PlayAnim('Dead3',, 0.1);
00081			return;
00082		}
00083		
00084		//then hit in front or back	
00085		if ( FRand() < 0.5 ) 
00086			PlayAnim('Dead4',, 0.1);
00087		else
00088			PlayAnim('Dead1',, 0.1);
00089	}
00090	
00091	function PlayDecap()
00092	{
00093		local carcass carc;
00094	
00095		PlayAnim('Dead6',, 0.1);
00096		if ( Level.NetMode != NM_Client )
00097		{
00098			carc = Spawn(class 'UT_HeadFemale',,, Location + CollisionHeight * vect(0,0,0.8), Rotation + rot(3000,0,16384) );
00099			if (carc != None)
00100			{
00101				carc.Initfor(self);
00102				carc.Velocity = Velocity + VSize(Velocity) * VRand();
00103				carc.Velocity.Z = FMax(carc.Velocity.Z, Velocity.Z);
00104			}
00105		}
00106	}
00107	
00108	defaultproperties
00109	{
00110	     Deaths(0)=Sound'Botpack.FemaleSounds.(All).death1d'
00111	     Deaths(1)=Sound'Botpack.FemaleSounds.(All).death2a'
00112	     Deaths(2)=Sound'Botpack.FemaleSounds.(All).death3c'
00113	     Deaths(3)=Sound'Botpack.FemaleSounds.(All).decap01'
00114	     Deaths(4)=Sound'Botpack.FemaleSounds.(All).death41'
00115	     Deaths(5)=Sound'Botpack.FemaleSounds.(All).death42'
00116	     drown=Sound'UnrealShare.Female.mdrown2fem'
00117	     breathagain=Sound'Botpack.FemaleSounds.(All).hgasp3'
00118	     HitSound3=Sound'Botpack.FemaleSounds.(All).linjur4'
00119	     HitSound4=Sound'Botpack.FemaleSounds.(All).hinjur4'
00120	     GaspSound=Sound'Botpack.FemaleSounds.(All).lgasp1'
00121	     UWHit1=Sound'Botpack.FemaleSounds.(All).UWhit01'
00122	     UWHit2=Sound'UnrealShare.Male.MUWHit2'
00123	     LandGrunt=Sound'Botpack.FemaleSounds.(All).lland1'
00124	     StatusDoll=Texture'Botpack.Icons.Woman'
00125	     StatusBelt=Texture'Botpack.Icons.WomanBelt'
00126	     VoicePackMetaClass="BotPack.VoiceFemale"
00127	     CarcassType=Class'Botpack.TFemale1Carcass'
00128	     JumpSound=Sound'Botpack.FemaleSounds.(All).Fjump1'
00129	     bIsFemale=True
00130	     HitSound1=Sound'Botpack.FemaleSounds.(All).linjur2'
00131	     HitSound2=Sound'Botpack.FemaleSounds.(All).linjur3'
00132	     Die=Sound'Botpack.FemaleSounds.(All).death1d'
00133	}

End Source Code