KF2-Server-Extension/ServerExt/Classes/MS_Game.uc

52 lines
1.1 KiB
Ucode
Raw Normal View History

2017-10-20 02:00:49 +00:00
// Minimal intermission gametype.
Class MS_Game extends GameInfo;
event Timer();
2020-11-28 20:04:55 +00:00
event InitGame(string Options, out string ErrorMessage)
2017-10-20 02:00:49 +00:00
{
2020-11-28 19:53:57 +00:00
MaxPlayers = 99;
MaxSpectators = 99;
2017-10-20 02:00:49 +00:00
class'MS_TMPUI'.Static.Remove();
}
// Add or remove reference to this game for GC
static final function SetReference()
{
class'MS_TMPUI'.Static.Apply();
}
event PlayerController Login(string Portal, string Options, const UniqueNetID UniqueID, out string ErrorMessage)
{
local NavigationPoint StartSpot;
local PlayerController NewPlayer;
local rotator SpawnRotation;
// Find a start spot.
2020-11-28 20:04:55 +00:00
StartSpot = FindPlayerStart(None, 255, Portal);
2017-10-20 02:00:49 +00:00
SpawnRotation.Yaw = StartSpot.Rotation.Yaw;
NewPlayer = SpawnPlayerController(StartSpot.Location, SpawnRotation);
NewPlayer.GotoState('PlayerWaiting');
return newPlayer;
}
2020-11-28 20:04:55 +00:00
event PostLogin(PlayerController NewPlayer)
2017-10-20 02:00:49 +00:00
{
GenericPlayerInitialization(NewPlayer);
}
function GenericPlayerInitialization(Controller C)
{
local PlayerController PC;
PC = PlayerController(C);
if (PC != None)
PC.ClientSetHUD(HudType);
}
defaultproperties
{
PlayerControllerClass=class'MS_PC'
HUDType=class'MS_HUD'
}