UnrealShare
Class HumanCarcass

source: e:\games\UnrealTournament\UnrealShare\Classes\HumanCarcass.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Decoration
         |
         +--Engine.Carcass
            |
            +--UnrealShare.CreatureCarcass
               |
               +--UnrealShare.HumanCarcass
Direct Known Subclasses:DeadMales, FemaleBody, FemaleTorso

class HumanCarcass
extends UnrealShare.CreatureCarcass

//============================================================================= // HumanCarcass. //=============================================================================
Variables
 class MasterReplacement

States
Dead

Function Summary
 void CreateReplacement()
 void Initfor(Actor Other)
 void ReduceCylinder()
 void SpawnHead()


State Dead Function Summary
 void BeginState()



Source Code


00001	//=============================================================================
00002	// HumanCarcass.
00003	//=============================================================================
00004	class HumanCarcass extends CreatureCarcass
00005		abstract;
00006	
00007	var class<CreatureChunks> MasterReplacement;
00008	
00009	function CreateReplacement()
00010	{
00011		local CreatureChunks carc;
00012		
00013		if (bHidden)
00014			return;
00015		carc = Spawn(MasterReplacement,,, Location + ZOffset[0] * CollisionHeight * vect(0,0,1)); 
00016		if (carc != None)
00017		{
00018			carc.bMasterChunk = true;
00019			MasterCreatureChunk(carc).PlayerRep = PlayerOwner;
00020			carc.Initfor(self);
00021			carc.Bugs = Bugs;
00022			if ( Bugs != None )
00023				Bugs.SetBase(carc);
00024			Bugs = None;
00025		}
00026		else if ( Bugs != None )
00027			Bugs.Destroy();
00028	}
00029	
00030	function SpawnHead()
00031	{
00032		local carcass carc;
00033	
00034		carc = Spawn(class'FemaleHead');
00035		if ( carc != None )
00036			carc.Initfor(self);
00037	}
00038	
00039	function Initfor(actor Other)
00040	{
00041		local int i;
00042	
00043		PlayerOwner = Pawn(Other).PlayerReplicationInfo;
00044		bReducedHeight = false;
00045		PrePivot = vect(0,0,0);
00046		for ( i=0; i<4; i++ )
00047			Multiskins[i] = Pawn(Other).MultiSkins[i];	
00048		Super.InitFor(Other);
00049	}
00050	
00051	function ReduceCylinder()
00052	{
00053		Super.ReduceCylinder();
00054		PrePivot = PrePivot - vect(0,0,2);
00055	}
00056	
00057	state Dead 
00058	{
00059		function BeginState()
00060		{
00061			if ( bDecorative || bPermanent 
00062				|| ((Level.NetMode == NM_Standalone) && Level.Game.IsA('SinglePlayer')) )
00063				lifespan = 0.0;
00064			else
00065			{
00066				if ( Mover(Base) != None )
00067				{
00068					ExistTime = FMax(12.0, 30.0 - 2 * DeathZone.NumCarcasses);
00069					SetTimer(3.0, true);
00070				}
00071				else
00072					SetTimer(FMax(12.0, 30.0 - 2 * DeathZone.NumCarcasses), false); 
00073			}
00074		}
00075	
00076	}
00077	
00078	defaultproperties
00079	{
00080	     flies=0
00081	     bReducedHeight=True
00082	     PrePivot=(Z=26.000000)
00083	     CollisionRadius=27.000000
00084	     CollisionHeight=13.000000
00085	     bBlockActors=False
00086	     bBlockPlayers=False
00087	}

End Source Code