2022-09-03 17:26:40 +00:00
|
|
|
class YASMut extends KFMutator;
|
2023-05-01 20:06:46 +00:00
|
|
|
|
2022-09-03 17:26:40 +00:00
|
|
|
var private YAS YAS;
|
2021-05-31 01:46:53 +00:00
|
|
|
|
2022-09-03 17:26:40 +00:00
|
|
|
public simulated function bool SafeDestroy()
|
2021-05-31 01:46:53 +00:00
|
|
|
{
|
2022-09-03 17:26:40 +00:00
|
|
|
return (bPendingDelete || bDeleteMe || Destroy());
|
2021-06-12 20:11:37 +00:00
|
|
|
}
|
|
|
|
|
2022-09-03 17:26:40 +00:00
|
|
|
public event PreBeginPlay()
|
2021-05-31 01:46:53 +00:00
|
|
|
{
|
2022-09-03 17:26:40 +00:00
|
|
|
Super.PreBeginPlay();
|
2023-05-01 20:06:46 +00:00
|
|
|
|
2022-09-03 17:26:40 +00:00
|
|
|
if (WorldInfo.NetMode == NM_Client) return;
|
2023-05-01 20:06:46 +00:00
|
|
|
|
2022-09-03 17:26:40 +00:00
|
|
|
foreach WorldInfo.DynamicActors(class'YAS', YAS)
|
2021-05-31 01:46:53 +00:00
|
|
|
{
|
2022-09-03 17:26:40 +00:00
|
|
|
break;
|
2021-05-31 01:46:53 +00:00
|
|
|
}
|
2023-05-01 20:06:46 +00:00
|
|
|
|
2022-09-03 17:26:40 +00:00
|
|
|
if (YAS == None)
|
2021-05-31 01:46:53 +00:00
|
|
|
{
|
2022-09-03 17:26:40 +00:00
|
|
|
YAS = WorldInfo.Spawn(class'YAS');
|
2021-06-12 18:44:20 +00:00
|
|
|
}
|
2023-05-01 20:06:46 +00:00
|
|
|
|
2022-09-03 17:26:40 +00:00
|
|
|
if (YAS == None)
|
2021-06-12 18:44:20 +00:00
|
|
|
{
|
2022-09-03 17:26:40 +00:00
|
|
|
`Log_Base("FATAL: Can't Spawn 'YAS'");
|
|
|
|
SafeDestroy();
|
2021-05-31 01:46:53 +00:00
|
|
|
}
|
2020-01-10 13:14:11 +00:00
|
|
|
}
|
|
|
|
|
2022-09-03 17:26:40 +00:00
|
|
|
public function AddMutator(Mutator Mut)
|
2020-01-17 18:46:21 +00:00
|
|
|
{
|
2022-09-03 17:26:40 +00:00
|
|
|
if (Mut == Self) return;
|
2023-05-01 20:06:46 +00:00
|
|
|
|
2022-09-03 17:26:40 +00:00
|
|
|
if (Mut.Class == Class)
|
2023-05-14 00:57:20 +00:00
|
|
|
YASMut(Mut).SafeDestroy();
|
2022-09-03 17:26:40 +00:00
|
|
|
else
|
|
|
|
Super.AddMutator(Mut);
|
2021-05-31 01:46:53 +00:00
|
|
|
}
|
|
|
|
|
2022-09-03 17:26:40 +00:00
|
|
|
public function NotifyLogin(Controller C)
|
2021-06-12 18:44:20 +00:00
|
|
|
{
|
2022-09-03 17:26:40 +00:00
|
|
|
YAS.NotifyLogin(C);
|
2023-05-01 20:06:46 +00:00
|
|
|
|
2022-09-03 17:26:40 +00:00
|
|
|
Super.NotifyLogin(C);
|
2021-06-12 18:44:20 +00:00
|
|
|
}
|
|
|
|
|
2022-09-03 17:26:40 +00:00
|
|
|
public function NotifyLogout(Controller C)
|
2021-06-12 18:44:20 +00:00
|
|
|
{
|
2022-09-03 17:26:40 +00:00
|
|
|
YAS.NotifyLogout(C);
|
2023-05-01 20:06:46 +00:00
|
|
|
|
2022-09-03 17:26:40 +00:00
|
|
|
Super.NotifyLogout(C);
|
2021-06-12 18:44:20 +00:00
|
|
|
}
|
|
|
|
|
2022-09-03 17:26:40 +00:00
|
|
|
DefaultProperties
|
2021-05-31 01:46:53 +00:00
|
|
|
{
|
2023-05-14 00:57:20 +00:00
|
|
|
GroupNames.Add("Scoreboard")
|
2023-05-02 19:15:42 +00:00
|
|
|
}
|