60 lines
824 B
Ucode
Raw Normal View History

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