KF2-CustomTraderInventory/CTI/Classes/CTIMut.uc

60 lines
891 B
Ucode
Raw Normal View History

2022-07-05 13:09:48 +00:00
class CTIMut extends KFMutator;
var private CTI CTI;
public simulated function bool SafeDestroy()
{
return (bPendingDelete || bDeleteMe || Destroy());
}
public event PreBeginPlay()
{
Super.PreBeginPlay();
if (WorldInfo.NetMode == NM_Client) return;
foreach WorldInfo.DynamicActors(class'CTI', CTI)
{
break;
}
if (CTI == None)
{
CTI = WorldInfo.Spawn(class'CTI');
}
if (CTI == None)
{
2022-08-24 16:14:28 +00:00
`Log_Base("FATAL: Can't Spawn 'CTI'");
2022-07-05 13:09:48 +00:00
SafeDestroy();
}
}
public function AddMutator(Mutator Mut)
{
if (Mut == Self) return;
if (Mut.Class == Class)
Mut.Destroy();
else
Super.AddMutator(Mut);
}
public function NotifyLogin(Controller C)
{
CTI.NotifyLogin(C);
2022-08-30 05:26:40 +00:00
Super.NotifyLogin(C);
2022-07-05 13:09:48 +00:00
}
public function NotifyLogout(Controller C)
{
CTI.NotifyLogout(C);
2022-08-30 05:26:40 +00:00
Super.NotifyLogout(C);
2022-07-05 13:09:48 +00:00
}
DefaultProperties
{
}