// ============================================================
// ******.******bot: put your comment here

// Created by UClasses - (C) 2000 by meltdown@thirdtower.com
// ============================================================

class ******bot expands MaleBotPlus;

function ForceMeshToExist()
{
	Spawn(class'******');
}
//so the b0rked wave plays....you may wish to put // in front of everything from if to where the slashes start and unslash the  stuff that was slashed if your wave anim. looked messed up...
function PlayVictoryDance()
{
	local float decision;

	decision = FRand();

	if ( decision < 0.4 )
		PlayAnim('Victory1',0.7, 0.2);
	else if ( decision < 0.7 )
		PlayAnim('Thrust',0.7, 0.2);
	else
		PlayAnim('Wave',0.7, 0.2);

	//if ( decision < 0.6 )
	//	PlayAnim('Victory1',0.7, 0.2);
	//else
	//	PlayAnim('thrust',0.7, 0.2);

}

function PlayDuck()
{
	BaseEyeHeight = 0;
	
	LoopAnim('DuckWait');
	ViewRotation.Pitch = ViewRotation.Pitch & 65535;
		If ( (ViewRotation.Pitch > RotationRate.Pitch) 
			&& (ViewRotation.Pitch < 65536 - RotationRate.Pitch) )
		{
			If (ViewRotation.Pitch < 32768) 
			{
				if ( (Weapon == None) || (Weapon.Mass < 20) )
					TweenAnim('duckUpSmaim', 0.3);
				else
					//I put whole animation in on accident and I'm too lazy to get rid of it, so I might as well USE it.....
					LoopAnim('duckUpLgaim');
			}
			else
			{
				if ( (Weapon == None) || (Weapon.Mass < 20) )
					TweenAnim('duckDnSmaim', 0.3);
				else
					TweenAnim('duckDnLgaim', 0.3);
			}
		}
else
TweenAnim('DuckWlkL', 0.3);
}
function PlayCrawling()
{
	//log("Play duck");
	BaseEyeHeight = 0;
	
	
		LoopAnim('DuckWlkL');
}
//no reco
function PlayRecoil(float Rate)
{
	PlayFiring();
}

function PlayFiring()
{
	// switch animation sequence mid-stream if needed
	if (AnimSequence == 'RunLG')
		AnimSequence = 'RunLGFR';
	else if (GetAnimGroup(AnimSequence) == 'Ducking')
	{
	//ducking fire.......
	ViewRotation.Pitch = ViewRotation.Pitch & 65535;
		If ( (ViewRotation.Pitch > RotationRate.Pitch) 
			&& (ViewRotation.Pitch < 65536 - RotationRate.Pitch) )
		{
			
					if (Weapon.Mass < 20) 
					AnimSequence = 'DuckDnSmFR';
				else
					AnimSequence = 'DuckDnLgFr';
			
		}
		else
		{
				if ( Weapon.Mass < 20) 
					AnimSequence = 'DuckUpSMFR';
				else
					
				AnimSequence = 'DuckUpLgFR';
			}
		
	}
	else if (AnimSequence == 'RunSM')
		AnimSequence = 'RunSMFR';
	else if (AnimSequence == 'WalkLG')
		AnimSequence = 'WalkLGFR';
	else if (AnimSequence == 'WalkSM')
		AnimSequence = 'WalkSMFR';
	else if ( AnimSequence == 'JumpSMFR' )
		TweenAnim('JumpSMFR', 0.03);
	else if ( AnimSequence == 'JumpLGFR' )
		TweenAnim('JumpLGFR', 0.03);
	else if ( (GetAnimGroup(AnimSequence) == 'Waiting') || (GetAnimGroup(AnimSequence) == 'Gesture')
		&& (AnimSequence != 'TreadLG') && (AnimSequence != 'TreadSM') )
	{
ViewRotation.Pitch = ViewRotation.Pitch & 65535;
		If ( (ViewRotation.Pitch > RotationRate.Pitch) 
			&& (ViewRotation.Pitch < 65536 - RotationRate.Pitch) )
		{
			If (ViewRotation.Pitch < 32768) 
			{
				if ( (Weapon == None) || (Weapon.Mass < 20) ){
					
					PlayAnim('AimUpSmFr');
					}
				else{
					
					PlayAnim('AimUpLgFr');
					}
			}
			else
			{
				if ( (Weapon == None) || (Weapon.Mass < 20) ){
					
					PlayAnim('AimDnSmFr');
					}
				else{
					
					PlayAnim('AimDnLgFr');
					}
			}
		}
	else{
		if ( Weapon.Mass < 20 )
			TweenAnim('StillSMFR', 0.02);
		else
			TweenAnim('StillLgFr', 0.02);
	}}
}

function PlayWaiting()
{
	local name newAnim;

	if ( Mesh == None )
		return;

	

	if ( (IsInState('PlayerSwimming')) || (Physics == PHYS_Swimming) )
	{
		BaseEyeHeight = 0.7 * Default.BaseEyeHeight;
		if ( (Weapon == None) || (Weapon.Mass < 20) )
			LoopAnim('TreadSM');
		else
			LoopAnim('TreadLG');
	}
	else
	{	
		BaseEyeHeight = Default.BaseEyeHeight;
		ViewRotation.Pitch = ViewRotation.Pitch & 65535;
		If ( (ViewRotation.Pitch > RotationRate.Pitch) 
			&& (ViewRotation.Pitch < 65536 - RotationRate.Pitch) )
		{
			If (ViewRotation.Pitch < 32768) 
			{
				if ( (Weapon == None) || (Weapon.Mass < 20) ){
					if ( (bFire != 0) || (bAltFire != 0) )
					PlayAnim('AimUpSmFr');
					else
					TweenAnim('AimUpSm', 0.3);}
				else{
					if ( (bFire != 0) || (bAltFire != 0) )
					PlayAnim('AimUpLgFr');
					else
					TweenAnim('AimUpLg', 0.3);}
			}
			else
			{
				if ( (Weapon == None) || (Weapon.Mass < 20) ){
					if ( (bFire != 0) || (bAltFire != 0) )
					PlayAnim('AimDnSmFr');
					else
					TweenAnim('AimDnSm', 0.3);}
				else{
					if ( (bFire != 0) || (bAltFire != 0) )
					PlayAnim('AimDnLgFr');
					else
					TweenAnim('AimDnLg', 0.3);}
			}
		}
		else if ( (Weapon != None) && Weapon.bPointing )
		{
			
			if ( Weapon.Mass < 20 )
				TweenAnim('StillSMFR', 0.3);
			else
				TweenAnim('StillFRRP', 0.3);
		}
		else
		{
			if ( FRand() < 0.1 )
			{
				if ( (Weapon == None) || (Weapon.Mass < 20) )
					PlayAnim('CockGun', 0.5 + 0.5 * FRand(), 0.3);
				else
					PlayAnim('CockGunL', 0.5 + 0.5 * FRand(), 0.3);
			}
			else
			{
				if ( (Weapon == None) || (Weapon.Mass < 20) )
				{
					if ( (FRand() < 0.75) && ((AnimSequence == 'Breath1') || (AnimSequence == 'Breath2')) )
						newAnim = AnimSequence;
					else if ( FRand() < 0.5 )
						newAnim = 'Breath1';
					else
						newAnim = 'Breath2';
				}
				else
				{
					if ( (FRand() < 0.75) && ((AnimSequence == 'Breath1L') || (AnimSequence == 'Breath2L')) )
						newAnim = AnimSequence;
					else if ( FRand() < 0.5 )
						newAnim = 'Breath1L';
					else
						newAnim = 'Breath2L';
				}
								
				if ( AnimSequence == newAnim )
					LoopAnim(newAnim, 0.4 + 0.4 * FRand());
				else
					PlayAnim(newAnim, 0.4 + 0.4 * FRand(), 0.25);
			}
		}
	}
}
function PlayDying(name DamageType, vector HitLoc)
{
	BaseEyeHeight = Default.BaseEyeHeight;
	PlayDyingSound();
	if (GetAnimGroup(AnimSequence) == 'Ducking')
	{
		PlayAnim('Deadduck');
		return;
	}
			
	if ( DamageType == 'Suicided' )
	{
		PlayAnim('Dead8',, 0.1);
		return;
	}

	// check for head hit
	if ( (DamageType == 'Decapitated') && !class'GameInfo'.Default.bVeryLowGore )
	{
		PlayDecap();
		return;
	}

	if ( FRand() < 0.1 )
	{
		PlayAnim('Dead2',,0.1);
		return;
	}

	// check for big hit
	if ( (Velocity.Z > 250) && (FRand() < 0.75) )
	{
		if ( FRand() < 0.5 )
			PlayAnim('Dead1',,0.1);
		else
			PlayAnim('Dead11',, 0.1);
		return;
	}

	// check for repeater death
	if ( (Health > -10) && ((DamageType == 'shot') || (DamageType == 'zapped')) )
	{
		PlayAnim('Dead9',, 0.1);
		return;
	}
		
	if ( (HitLoc.Z - Location.Z > 0.7 * CollisionHeight) && !class'GameInfo'.Default.bVeryLowGore )
	{
		if ( FRand() < 0.5 )
			PlayDecap();
		else
			PlayAnim('Dead7',, 0.1);
		return;
	}
	
	if ( Region.Zone.bWaterZone || (FRand() < 0.5) ) //then hit in front or back
		PlayAnim('Dead3',, 0.1);
	else
		PlayAnim('Dead8',, 0.1);
}
defaultproperties
{
    DrawType=DT_Mesh
	FaceSkin=1
	defaultpackage="******skins."
	 DefaultSkinName="******Skins.%%%%"
    Selectionmesh="******.******"
    Mesh=LodMesh'******'
}
