Botpack
Class UTHeads

source: e:\games\UnrealTournament\Botpack\Classes\UTHeads.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Decoration
         |
         +--Engine.Carcass
            |
            +--Botpack.UTCreatureChunks
               |
               +--Botpack.UTPlayerChunks
                  |
                  +--Botpack.UTHeads
Direct Known Subclasses:UT_bosshead, UT_HeadFemale, UT_HeadMale

class UTHeads
extends Botpack.UTPlayerChunks


States
Dying

Function Summary
 void ChunkUp(int Damage)
 
simulated
Initfor(Actor Other)
 
simulated
Landed(vector HitNormal)


State Dying Function Summary



Source Code


00001	class UTHeads extends UTPlayerChunks;
00002	
00003	function ChunkUp(int Damage)
00004	{
00005	}
00006	
00007	simulated function Initfor(actor Other)
00008	{
00009		Super.InitFor(Other);
00010		if ( Other.bIsPawn )
00011			PlayerOwner = Pawn(Other).PlayerReplicationInfo;
00012		else if ( Other.IsA('UTMasterCreatureChunk') )
00013			PlayerOwner = UTMasterCreatureChunk(Other).PlayerRep;
00014		else if ( Other.IsA('Carcass') )
00015			PlayerOwner = Carcass(Other).PlayerOwner;
00016		RotationRate = RotationRate/3;
00017	}
00018	
00019	simulated function Landed(vector HitNormal)
00020	{
00021		local rotator finalRot;
00022		local UT_BloodBurst b;
00023	
00024		if ( trail != None )
00025		{
00026			if ( Level.bHighDetailMode && !Level.bDropDetail )
00027				bUnlit = false;
00028			trail.Destroy();
00029			trail = None;
00030		}
00031		if ( Level.NetMode != NM_DedicatedServer )
00032		{
00033			b = Spawn(class 'UT_BloodBurst');
00034			if ( bGreenBlood )
00035				b.GreenBlood();		
00036			b.RemoteRole = ROLE_None;
00037		}
00038		SetPhysics(PHYS_None);
00039		SetCollision(true, false, false);
00040	}
00041	
00042	auto State Dying
00043	{
00044		simulated function Tick(float DeltaTime)
00045		{
00046			local PlayerPawn P;
00047	
00048			Disable('Tick');
00049			if ( (PlayerOwner != None) && (PlayerOwner.Owner != None) )
00050			{
00051				P = PlayerPawn(PlayerOwner.Owner);
00052				if ( (P != None) && (P.Health <= 0) && !P.IsInState('GameEnded') )
00053				{
00054					P.ViewTarget = self;
00055					P.bBehindView = false;
00056				}
00057			}
00058		}
00059	}
00060	
00061	defaultproperties
00062	{
00063	}

End Source Code