Botpack
Class TournamentPickup

source: e:\games\UnrealTournament\Botpack\Classes\TournamentPickup.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Inventory
         |
         +--Engine.Pickup
            |
            +--Botpack.TournamentPickup
Direct Known Subclasses:Armor2, ThighPads, UDamage, UT_Invisibility, UT_JumpBoots, UT_ShieldBelt

class TournamentPickup
extends Engine.Pickup

//============================================================================= // TournamentPickup. //=============================================================================

Function Summary
 void BecomeItem()
 void FireEffect()



Source Code


00001	//=============================================================================
00002	// TournamentPickup.
00003	//=============================================================================
00004	class TournamentPickup extends Pickup;
00005	
00006	function FireEffect();
00007	
00008	function BecomeItem()
00009	{
00010		local Bot B;
00011		local Pawn P;
00012	
00013		Super.BecomeItem();
00014	
00015		if ( Instigator.IsA('Bot') || Level.Game.bTeamGame || !Level.Game.IsA('DeathMatchPlus')
00016			|| DeathMatchPlus(Level.Game).bNoviceMode
00017			|| (DeathMatchPlus(Level.Game).NumBots > 4) )
00018			return;
00019	
00020		// let high skill bots hear pickup if close enough
00021		for ( P=Level.PawnList; P!=None; P=P.NextPawn )
00022		{
00023			B = Bot(p);
00024			if ( (B != None)
00025				&& (VSize(B.Location - Instigator.Location) < 800 + 100 * B.Skill) )
00026			{
00027				B.HearPickup(Instigator);
00028				return;
00029			}
00030		}
00031	}
00032	
00033	defaultproperties
00034	{
00035	     M_Activated=""
00036	     M_Selected=""
00037	     M_Deactivated=""
00038	     PickupMessageClass=Class'Botpack.PickupMessagePlus'
00039	     ItemMessageClass=Class'Botpack.ItemMessagePlus'
00040	     bClientAnim=True
00041	}

End Source Code