2022-09-26 13:07:26 +03:00
|
|
|
class MSKGS_Mut extends KFMutator;
|
2021-02-26 02:55:43 +03:00
|
|
|
|
2022-08-16 09:59:16 +03:00
|
|
|
var private MSKGS MSKGS;
|
2021-04-14 04:28:23 +03:00
|
|
|
|
2022-08-16 09:59:16 +03:00
|
|
|
public simulated function bool SafeDestroy()
|
2022-03-24 08:07:21 +03:00
|
|
|
{
|
2022-08-16 09:59:16 +03:00
|
|
|
return (bPendingDelete || bDeleteMe || Destroy());
|
2022-03-24 08:07:21 +03:00
|
|
|
}
|
2021-02-26 03:13:55 +03:00
|
|
|
|
2022-08-16 09:59:16 +03:00
|
|
|
public event PreBeginPlay()
|
2021-04-14 04:28:23 +03:00
|
|
|
{
|
2022-08-16 09:59:16 +03:00
|
|
|
Super.PreBeginPlay();
|
2021-02-26 02:55:43 +03:00
|
|
|
|
2022-08-16 09:59:16 +03:00
|
|
|
if (WorldInfo.NetMode == NM_Client) return;
|
2022-03-21 20:49:44 +03:00
|
|
|
|
2022-08-16 09:59:16 +03:00
|
|
|
foreach WorldInfo.DynamicActors(class'MSKGS', MSKGS)
|
2021-02-20 13:30:45 +03:00
|
|
|
{
|
2022-08-16 09:59:16 +03:00
|
|
|
break;
|
2021-02-20 13:30:45 +03:00
|
|
|
}
|
2022-03-21 20:49:44 +03:00
|
|
|
|
2022-08-16 09:59:16 +03:00
|
|
|
if (MSKGS == None)
|
2022-01-04 00:16:16 +03:00
|
|
|
{
|
2022-08-16 09:59:16 +03:00
|
|
|
MSKGS = WorldInfo.Spawn(class'MSKGS');
|
2022-01-04 00:16:16 +03:00
|
|
|
}
|
2021-12-09 07:34:12 +03:00
|
|
|
|
2022-08-16 09:59:16 +03:00
|
|
|
if (MSKGS == None)
|
2022-03-21 20:10:41 +03:00
|
|
|
{
|
2022-08-16 09:59:16 +03:00
|
|
|
`Log_Base("FATAL: Can't Spawn 'MSKGS'");
|
|
|
|
SafeDestroy();
|
2022-03-21 20:10:41 +03:00
|
|
|
}
|
2021-02-20 13:30:45 +03:00
|
|
|
}
|
|
|
|
|
2022-08-16 09:59:16 +03:00
|
|
|
public function InitMutator(String Options, out String ErrorMessage)
|
2021-02-20 13:30:45 +03:00
|
|
|
{
|
2022-08-16 09:59:16 +03:00
|
|
|
Super.InitMutator(Options, ErrorMessage);
|
2021-04-14 04:28:23 +03:00
|
|
|
|
2022-08-16 09:59:16 +03:00
|
|
|
MSKGS.SetMaxPlayers(class'GameInfo'.static.GetIntOption(Options, "MaxPlayers", INDEX_NONE));
|
2021-04-14 04:28:23 +03:00
|
|
|
}
|
|
|
|
|
2022-08-16 09:59:16 +03:00
|
|
|
public function AddMutator(Mutator Mut)
|
2021-04-14 04:28:23 +03:00
|
|
|
{
|
|
|
|
if (Mut == Self) return;
|
2021-02-20 13:30:45 +03:00
|
|
|
|
|
|
|
if (Mut.Class == Class)
|
|
|
|
Mut.Destroy();
|
|
|
|
else
|
|
|
|
Super.AddMutator(Mut);
|
|
|
|
}
|
|
|
|
|
2022-08-16 09:59:16 +03:00
|
|
|
public function NotifyLogin(Controller C)
|
2021-06-23 00:58:28 +03:00
|
|
|
{
|
2022-08-16 09:59:16 +03:00
|
|
|
MSKGS.NotifyLogin(C);
|
2022-03-21 20:49:44 +03:00
|
|
|
|
2022-08-16 09:59:16 +03:00
|
|
|
Super.NotifyLogin(C);
|
2021-06-23 00:58:28 +03:00
|
|
|
}
|
|
|
|
|
2022-08-16 09:59:16 +03:00
|
|
|
public function NotifyLogout(Controller C)
|
2021-06-23 00:58:28 +03:00
|
|
|
{
|
2022-08-16 09:59:16 +03:00
|
|
|
MSKGS.NotifyLogout(C);
|
2022-03-21 20:49:44 +03:00
|
|
|
|
2022-08-16 09:59:16 +03:00
|
|
|
Super.NotifyLogout(C);
|
2021-06-23 00:58:28 +03:00
|
|
|
}
|
|
|
|
|
2021-02-20 13:30:45 +03:00
|
|
|
defaultproperties
|
|
|
|
{
|
2022-08-16 09:59:16 +03:00
|
|
|
|
2021-02-20 13:30:45 +03:00
|
|
|
}
|