XIIIMP
Class XIIIMPSpecialMatos

source: C:\XIII\XIIIMP\Classes\XIIIMPSpecialMatos.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Inventory
         |
         +--XIIIMP.XIIIMPSpecialMatos
Direct Known Subclasses:HarnaisBomb, HarnaisCTF

class XIIIMPSpecialMatos
extends Engine.Inventory

//----------------------------------------------------------- // //-----------------------------------------------------------
Variables
 name BoneToAttach
           bone to attach the armor


Function Summary
 
simulated
AttachMatosToPawn(Pawn P)
     
//_____________________________________________________________________________
 void GiveTo(Pawn Other)
     
//_____________________________________________________________________________



Source Code


00001	//-----------------------------------------------------------
00002	//
00003	//-----------------------------------------------------------
00004	class XIIIMPSpecialMatos extends Inventory;
00005	
00006	var() name BoneToAttach;                  // bone to attach the armor
00007	
00008	//_____________________________________________________________________________
00009	
00010	function GiveTo( pawn Other )
00011	{
00012	    DetachFromPawn(Pawn(Owner));
00013	    Super.GiveTo(other);
00014	    AttachMatosToPawn(Other);
00015	}
00016	
00017	//_____________________________________________________________________________
00018	
00019	simulated function AttachMatosToPawn(Pawn P)
00020	{
00021		local name BoneName;
00022	
00023		if ( ThirdPersonActor == None )
00024		{
00025			ThirdPersonActor = Spawn(AttachmentClass,Owner);
00026			InventoryAttachment(ThirdPersonActor).InitFor(self);
00027		}
00028	
00029	    BoneName = BoneToAttach;
00030	
00031		if ( BoneName == '' )
00032		{
00033			ThirdPersonActor.SetLocation(P.Location);
00034			ThirdPersonActor.SetBase(P);
00035		}
00036		else
00037			P.AttachToBone(ThirdPersonActor,BoneName);
00038	
00039		ThirdPersonActor.SetRelativeLocation(ThirdPersonRelativeLocation);
00040		ThirdPersonActor.SetRelativeRotation(ThirdPersonRelativeRotation);
00041	}
00042	
00043	//_____________________________________________________________________________
00044	
00045	
00046	
00047	defaultproperties
00048	{
00049	}

End Source Code