KF2-ZedSpawner/ZedSpawner/Classes/ZedSpawnerMut.uc

56 lines
832 B
Ucode
Raw Normal View History

2022-05-11 15:43:39 +03:00
class ZedSpawnerMut extends KFMutator
dependson(ZedSpawner);
var private ZedSpawner ZS;
2022-07-13 09:56:35 +03:00
public event PreBeginPlay()
2022-05-11 15:43:39 +03:00
{
2022-07-19 13:28:43 +03:00
Super.PreBeginPlay();
2022-05-11 15:43:39 +03:00
if (WorldInfo.NetMode == NM_Client) return;
foreach WorldInfo.DynamicActors(class'ZedSpawner', ZS)
{
break;
}
if (ZS == None)
{
ZS = WorldInfo.Spawn(class'ZedSpawner');
}
if (ZS == None)
{
2022-08-22 18:00:24 +03:00
`Log_Base("FATAL: Can't Spawn 'ZedSpawner'");
2022-05-11 15:43:39 +03:00
Destroy();
}
}
public function AddMutator(Mutator Mut)
{
if (Mut == Self) return;
if (Mut.Class == Class)
Mut.Destroy();
else
Super.AddMutator(Mut);
}
2022-07-13 09:56:35 +03:00
public function NotifyLogin(Controller C)
2022-05-13 10:02:34 +03:00
{
ZS.NotifyLogin(C);
2022-08-30 08:39:34 +03:00
Super.NotifyLogin(C);
2022-05-13 10:02:34 +03:00
}
2022-07-13 09:56:35 +03:00
public function NotifyLogout(Controller C)
2022-05-13 10:02:34 +03:00
{
ZS.NotifyLogout(C);
2022-08-30 08:39:34 +03:00
Super.NotifyLogout(C);
2022-05-13 10:02:34 +03:00
}
2022-09-02 16:17:55 +03:00
defaultproperties
2022-05-11 15:43:39 +03:00
{
}