29 lines
867 B
Ucode
29 lines
867 B
Ucode
class ScrnBotPawn extends KFHumanPawn;
|
|
|
|
simulated function PostNetBeginPlay()
|
|
{
|
|
local SquadAI S;
|
|
|
|
super.PostNetBeginPlay();
|
|
|
|
// C&P from UnrealPawn, because it seems like Squad isn't set for pawns placed on level
|
|
if ( Role == ROLE_Authority && Bot(Controller) != none && Bot(Controller).Squad == none ) {
|
|
ForEach DynamicActors(class'SquadAI',S,SquadName)
|
|
break;
|
|
if ( S == None )
|
|
S = spawn(class'SquadAI');
|
|
S.Tag = SquadName;
|
|
if ( bIsSquadLeader || (S.SquadLeader == None) ) {
|
|
S.SetLeader(Controller);
|
|
S.Team = UnrealTeamInfo(Controller.PlayerReplicationInfo.Team);
|
|
}
|
|
S.AddBot(Bot(Controller));
|
|
}
|
|
}
|
|
|
|
defaultproperties
|
|
{
|
|
SquadName="BotSquad"
|
|
ControllerClass=Class'ScrnTestGroundsUtil.ScrnInvasionBot'
|
|
}
|