Botpack
Class ThighPads

source: e:\games\UnrealTournament\Botpack\Classes\ThighPads.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Inventory
         |
         +--Engine.Pickup
            |
            +--Botpack.TournamentPickup
               |
               +--Botpack.ThighPads
Direct Known Subclasses:None

class ThighPads
extends Botpack.TournamentPickup

//============================================================================= // ThighPads. //=============================================================================

Function Summary
 bool HandlePickupQuery(Inventory Item)
 Inventory SpawnCopy(Pawn Other)



Source Code


00001	//=============================================================================
00002	// ThighPads.
00003	//=============================================================================
00004	class ThighPads extends TournamentPickup;
00005	
00006	#exec MESH IMPORT MESH=ThighPads ANIVFILE=MODELS\ThighPads_a.3d DATAFILE=MODELS\ThighPads_d.3d X=0 Y=0 Z=0
00007	#exec MESH ORIGIN MESH=ThighPads X=0 Y=0 Z=0
00008	#exec MESH SEQUENCE MESH=ThighPads SEQ=All                      STARTFRAME=0 NUMFRAMES=1
00009	#exec MESH SEQUENCE MESH=ThighPads SEQ=sit                      STARTFRAME=0 NUMFRAMES=1
00010	#exec MESHMAP NEW   MESHMAP=ThighPads MESH=ThighPads
00011	#exec MESHMAP SCALE MESHMAP=ThighPads X=0.04 Y=0.04 Z=0.08
00012	#exec TEXTURE IMPORT NAME=JThighPads_01 FILE=MODELS\ThighPads1.PCX GROUP=Skins LODSET=2
00013	#exec MESHMAP SETTEXTURE MESHMAP=ThighPads NUM=1 TEXTURE=JThighPads_01
00014	#exec MESHMAP SETTEXTURE MESHMAP=ThighPads NUM=2 TEXTURE=JThighPads_01
00015	
00016	function bool HandlePickupQuery( inventory Item )
00017	{
00018		local inventory S;
00019	
00020		if ( item.class == class ) 
00021		{
00022			S = Pawn(Owner).FindInventoryType(class'UT_Shieldbelt');	
00023			if (  S==None )
00024			{
00025				if ( Charge<Item.Charge )	
00026					Charge = Item.Charge;
00027			}
00028			else
00029				Charge = Clamp(S.Default.Charge - S.Charge, Charge, Item.Charge );
00030			if (Level.Game.LocalLog != None)
00031				Level.Game.LocalLog.LogPickup(Item, Pawn(Owner));
00032			if (Level.Game.WorldLog != None)
00033				Level.Game.WorldLog.LogPickup(Item, Pawn(Owner));
00034			if ( PickupMessageClass == None )
00035				Pawn(Owner).ClientMessage(PickupMessage, 'Pickup');
00036			else
00037				Pawn(Owner).ReceiveLocalizedMessage( PickupMessageClass, 0, None, None, Self.Class );
00038			Item.PlaySound (PickupSound,,2.0);
00039			Item.SetReSpawn();
00040			return true;				
00041		}
00042		if ( Inventory == None )
00043			return false;
00044	
00045		return Inventory.HandlePickupQuery(Item);
00046	}
00047	
00048	function inventory SpawnCopy( pawn Other )
00049	{
00050		local inventory Copy, S;
00051	
00052		Copy = Super.SpawnCopy(Other);
00053		S = Other.FindInventoryType(class'UT_Shieldbelt');	
00054		if ( S != None )
00055		{
00056			Copy.Charge = Min(Copy.Charge, S.Default.Charge - S.Charge);
00057			if ( Copy.Charge <= 0 )
00058			{ 
00059				S.Charge -= 1;
00060				Copy.Charge = 1;
00061			}
00062		}
00063		return Copy;
00064	}
00065	
00066	defaultproperties
00067	{
00068	     bDisplayableInv=True
00069	     bRotatingPickup=True
00070	     PickupMessage="You got the Thigh Pads."
00071	     ItemName="Thigh Pads"
00072	     RespawnTime=30.000000
00073	     PickupViewMesh=LodMesh'Botpack.ThighPads'
00074	     Charge=50
00075	     ArmorAbsorption=50
00076	     bIsAnArmor=True
00077	     AbsorptionPriority=7
00078	     MaxDesireability=1.800000
00079	     PickupSound=Sound'Botpack.Pickups.ArmorUT'
00080	     Icon=Texture'UnrealShare.Icons.I_Armor'
00081	     Mesh=LodMesh'Botpack.ThighPads'
00082	     AmbientGlow=64
00083	}

End Source Code