Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

UPak.MarineMatch


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
//=============================================================================
// MarineMatch.
//=============================================================================
class MarineMatch expands DeathMatchGame;

var() Class<SpaceMarine> MarineTypes[4];
var() config bool bTerranWeaponsOnly;
function PostBeginPlay()
{
	if( bTerranWeaponsOnly )
		Class'CloakMatch'.Static.TerranWeaponSetup(Self);
}
function bool AddBot()
{
	local NavigationPoint StartSpot;
	local bots NewBot;
	local int BotN;

	BotN = BotConfig.ChooseBotInfo();
	
	// Find a start spot.
	StartSpot = FindPlayerStart(0);
	if( StartSpot == None )
	{
		log("Could not find starting spot for Bot");
		return false;
	}

	// Try to spawn the player.
	NewBot = Spawn( MarineTypes[Rand(ArrayCount(MarineTypes))],,, StartSpot.Location, StartSpot.Rotation );
	if ( NewBot == None )
		return false;

	StartSpot.PlayTeleportEffect(NewBot, true);

	// Init player's information.
	BotConfig.Individualize(NewBot, BotN, NumBots);
	NewBot.ViewRotation = StartSpot.Rotation;

	// broadcast a welcome message.
	BroadcastMessage( NewBot.PlayerReplicationInfo.PlayerName$EnteredMessage, true );

	AddDefaultInventory( NewBot );
	NumBots++;
	return true;
}
function InitGameReplicationInfo()
{
	Super.InitGameReplicationInfo();
	GameName = Class'DeathMatchGame'.Default.GameName;
}

defaultproperties
{
				MarineTypes(0)=Class'UPak.SpaceMarine'
				MarineTypes(1)=Class'UPak.MarineDesert'
				MarineTypes(2)=Class'UPak.MarineJungle'
				MarineTypes(3)=Class'UPak.MarineArctic'
				bTerranWeaponsOnly=True
				GameName="MarineMatch"
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: zo 11-11-2012 21:10:30.000 - Creation time: zo 11-11-2012 21:14:19.240 - Created with UnCodeX