Botpack
Class Commander

source: e:\games\UnrealTournament\Botpack\Classes\Commander.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Pawn
         |
         +--Engine.PlayerPawn
            |
            +--Botpack.TournamentPlayer
               |
               +--Botpack.Commander
Direct Known Subclasses:None

class Commander
extends Botpack.TournamentPlayer

//============================================================================= // Commander - a spectator who controls a team //=============================================================================
Variables
 bool bChaseCam

States
CheatFlying, PlayerWaiting

Function Summary
 void ActivateItem()
 void AltFire(optional float)
     
// The player wants to alternate-fire.
 void BehindView(Bool B)
 void CallForHelp()
 void ChangeTeam(int N)
 void ClientPlayTakeHit(vector HitLoc, byte Damage, bool bServerGuessWeapon)
 void ClientReStart()
 void Fire(optional float)
 void Fly()
 void Gasp()
 void GetMultiSkin(Actor SkinActor, out string, out string)
     
/* Skin Stuff */
 void Grab()
 void InitPlayerReplicationInfo()
 void Loaded()
 void NextItem()
 
simulated
PlayBeepSound()
 void PlayChatting()
 void PlayCrawling()
 void PlayDeathHit(float Damage, vector HitLocation, name damageType, vector Momentum)
 void PlayDodge(eDodgeDir DodgeMove)
 void PlayDuck()
 void PlayDyingSound()
 void PlayFeignDeath()
 void PlayFiring()
 
simulated
PlayFootStep()
 void PlayGutHit(float tweentime)
 void PlayHeadHit(float tweentime)
 void PlayHit(float Damage, vector HitLocation, name damageType, vector Momentum)
 void PlayInAir()
 void PlayLanded(float impactVel)
 void PlayLeftHit(float tweentime)
 void PlayRecoil(float Rate)
 void PlayRightHit(float tweentime)
 void PlayRising()
 void PlayRunning()
 void PlaySwimming()
 void PlayTakeHitSound(int damage, name damageType, int Mult)
     
//-----------------------------------------------------------------------------
// Sound functions
 void PlayTurning()
     
//-----------------------------------------------------------------------------
// Animation functions
 void PlayWaiting()
 void PlayWalking()
 void PlayWeaponSwitch(Weapon NewWeapon)
 void PlayerTimeOut()
 void Possess()
     
// This pawn was possessed by a player.
 void PostBeginPlay()
 void PrevItem()
 void RestartLevel()
 void ServerChangeSkin(string SkinName, string FaceName, byte TeamNum)
 void SetMultiSkin(Actor SkinActor, string SkinName, string FaceName, byte TeamNum)
 void StartWalk()
 void Suicide()
 void SwitchWeapon(byte F)
     
// The player wants to switch to weapon group numer I.
 void TakeDamage(int Damage, Pawn instigatedBy, Vector hitlocation, Vector momentum, name damageType)
     
//=================================================================================
 void Taunt(name Sequence)
 void ThrowWeapon()
 void TweenToRunning(float tweentime)
 void TweenToSwimming(float tweentime)
 void TweenToWaiting(float tweentime)
 void TweenToWalking(float tweentime)
 void Walk()


State CheatFlying Function Summary
 void BeginState()


State PlayerWaiting Function Summary
 void EndState()



Source Code


00001	//=============================================================================
00002	// Commander - a spectator who controls a team
00003	//=============================================================================
00004	class Commander extends TournamentPlayer
00005		config(User);
00006	
00007	var bool bChaseCam;
00008	
00009	function PostBeginPlay()
00010	{
00011		if (Level.LevelEnterText != "" )
00012			ClientMessage(Level.LevelEnterText);
00013		bIsPlayer = true;
00014		FlashScale = vect(1,1,1);
00015		if ( Level.NetMode != NM_Client )
00016		{
00017			ScoringType = Level.Game.ScoreboardType;
00018			HUDType = Level.Game.HUDType;
00019		}
00020		PlayerReplicationInfo.bIsSpectator = true;
00021	}
00022	
00023	exec function Loaded()
00024	{
00025	}
00026	
00027	function PlayDodge(eDodgeDir DodgeMove)
00028	{
00029	}
00030	
00031	function PlayDyingSound()
00032	{
00033	}
00034	
00035	simulated function PlayBeepSound()
00036	{
00037		PlaySound(sound'NewBeep',SLOT_Interface, 2.0);
00038	}
00039	
00040	function PlayChatting()
00041	{
00042	}
00043	
00044	function PlayWaiting()
00045	{
00046	}
00047	
00048	/* Skin Stuff */
00049	static function GetMultiSkin( Actor SkinActor, out string SkinName, out string FaceName )
00050	{
00051	}
00052	
00053	static function SetMultiSkin(Actor SkinActor, string SkinName, string FaceName, byte TeamNum)
00054	{
00055	}
00056	
00057	simulated function PlayFootStep()
00058	{
00059	}
00060	
00061	function PlayHit(float Damage, vector HitLocation, name damageType, vector Momentum)
00062	{
00063	}
00064	
00065	function PlayDeathHit(float Damage, vector HitLocation, name damageType, vector Momentum)
00066	{
00067	}
00068	
00069	//-----------------------------------------------------------------------------
00070	// Sound functions
00071	
00072	function PlayTakeHitSound(int damage, name damageType, int Mult)
00073	{
00074	}
00075	
00076	function ClientPlayTakeHit(vector HitLoc, byte Damage, bool bServerGuessWeapon)
00077	{
00078	}	
00079	
00080	function Gasp()
00081	{
00082	}
00083	
00084	//-----------------------------------------------------------------------------
00085	// Animation functions
00086	
00087	function PlayTurning()
00088	{
00089	}
00090	
00091	function TweenToWalking(float tweentime)
00092	{
00093	}
00094	
00095	function PlayWalking()
00096	{
00097	}
00098	
00099	function TweenToRunning(float tweentime)
00100	{
00101	}
00102	
00103	function PlayRunning()
00104	{
00105	}
00106	
00107	function PlayRising()
00108	{
00109	}
00110	
00111	function PlayFeignDeath()
00112	{
00113	}
00114	
00115	function PlayGutHit(float tweentime)
00116	{
00117	}
00118	
00119	function PlayHeadHit(float tweentime)
00120	{
00121	}
00122	
00123	function PlayLeftHit(float tweentime)
00124	{
00125	}
00126	
00127	function PlayRightHit(float tweentime)
00128	{
00129	}
00130		
00131	function PlayLanded(float impactVel)
00132	{	
00133	}
00134		
00135	function PlayInAir()
00136	{
00137	}
00138	
00139	function PlayDuck()
00140	{
00141	}
00142	
00143	function PlayCrawling()
00144	{
00145	}
00146	
00147	function TweenToWaiting(float tweentime)
00148	{
00149	}
00150		
00151	function PlayRecoil(float Rate)
00152	{
00153	}
00154	
00155	function PlayFiring()
00156	{
00157	}
00158	
00159	function PlayWeaponSwitch(Weapon NewWeapon)
00160	{
00161	}
00162	
00163	function PlaySwimming()
00164	{
00165	}
00166	
00167	function TweenToSwimming(float tweentime)
00168	{
00169	}
00170	
00171	event FootZoneChange(ZoneInfo newFootZone)
00172	{
00173	}
00174		
00175	event HeadZoneChange(ZoneInfo newHeadZone)
00176	{
00177	}
00178	
00179	exec function Walk()
00180	{	
00181	}
00182	
00183	exec function ActivateItem()
00184	{
00185		bBehindView = !bBehindView;
00186		bChaseCam = bBehindView;
00187	}
00188	
00189	exec function BehindView( Bool B )
00190	{
00191		bBehindView = B;
00192		bChaseCam = bBehindView;
00193	}
00194	
00195	function ChangeTeam( int N )
00196	{
00197		Level.Game.ChangeTeam(self, N);
00198	}
00199	
00200	exec function Taunt( name Sequence )
00201	{
00202	}
00203	
00204	exec function CallForHelp()
00205	{
00206	}
00207	
00208	exec function ThrowWeapon()
00209	{
00210	}
00211	
00212	exec function Suicide()
00213	{
00214	}
00215	
00216	exec function Fly()
00217	{
00218	}
00219	
00220	function StartWalk()
00221	{
00222		bCollideWorld = true;
00223		ClientReStart();	
00224	}
00225	
00226	function ServerChangeSkin( coerce string SkinName, coerce string FaceName, byte TeamNum )
00227	{
00228	}
00229	
00230	function ClientReStart()
00231	{
00232		Velocity = vect(0,0,0);
00233		Acceleration = vect(0,0,0);
00234		BaseEyeHeight = Default.BaseEyeHeight;
00235		EyeHeight = BaseEyeHeight;
00236		
00237		GotoState(PlayerReStartState);
00238	}
00239	
00240	// This pawn was possessed by a player.
00241	function Possess()
00242	{
00243		bIsPlayer = true;
00244		EyeHeight = BaseEyeHeight;
00245		NetPriority = 2;
00246		Weapon = None;
00247		Inventory = None;
00248		bCollideWorld = true;
00249		ClientReStart();	
00250	}
00251	
00252	function PlayerTimeOut()
00253	{
00254		if (Health > 0)
00255			Died(None, 'dropped', Location);
00256	}
00257	
00258	exec function Grab()
00259	{
00260	}
00261	
00262	function InitPlayerReplicationInfo()
00263	{
00264		Super.InitPlayerReplicationInfo();
00265		PlayerReplicationInfo.bIsSpectator = true;
00266	}
00267	
00268	exec function RestartLevel()
00269	{
00270	}
00271	
00272	//=============================================================================
00273	// Inventory-related input notifications.
00274	
00275	// The player wants to switch to weapon group numer I.
00276	exec function SwitchWeapon (byte F )
00277	{
00278	}
00279	
00280	exec function NextItem()
00281	{
00282	}
00283	
00284	exec function PrevItem()
00285	{
00286	}
00287	
00288	exec function Fire( optional float F )
00289	{
00290		ViewPlayerNum(-1);
00291	
00292		bBehindView = bChaseCam && (ViewTarget != None);
00293	}
00294	
00295	// The player wants to alternate-fire.
00296	exec function AltFire( optional float F )
00297	{
00298		bBehindView = false;
00299		Viewtarget = None;
00300		ClientMessage("Now viewing from own camera", 'Event', true);
00301	}
00302	
00303	//=================================================================================
00304	
00305	function TakeDamage( int Damage, Pawn instigatedBy, Vector hitlocation, 
00306							Vector momentum, name damageType)
00307	{
00308	}
00309	
00310	state PlayerWaiting
00311	{
00312	ignores SeePlayer, HearNoise, Bump, TakeDamage, Died, ZoneChange, FootZoneChange;
00313	
00314	
00315		function EndState()
00316		{
00317			PlayerReplicationInfo.bWaitingPlayer = false;
00318		}
00319	}
00320	
00321	state CheatFlying
00322	{
00323	ignores SeePlayer, HearNoise, Bump, TakeDamage;
00324	
00325		function BeginState()
00326		{
00327			Super.BeginState();
00328			SetCollision(false,false,false);
00329		}
00330	}
00331	
00332	defaultproperties
00333	{
00334	     bChaseCam=True
00335	     bIsMultiSkinned=False
00336	     AirSpeed=600.000000
00337	     Visibility=0
00338	     AttitudeToPlayer=ATTITUDE_Friendly
00339	     PlayerReStartState=CheatFlying
00340	     MenuName="Commander"
00341	     bHidden=True
00342	     DrawType=DT_None
00343	     bCollideActors=False
00344	     bCollideWorld=False
00345	     bBlockActors=False
00346	     bBlockPlayers=False
00347	     bProjTarget=False
00348	}

End Source Code