60 lines
979 B
Ucode
60 lines
979 B
Ucode
|
class SkinReplicatorMut extends KFMutator;
|
||
|
|
||
|
var private SkinReplicator SkinReplicator;
|
||
|
|
||
|
public simulated function bool SafeDestroy()
|
||
|
{
|
||
|
return (bPendingDelete || bDeleteMe || Destroy());
|
||
|
}
|
||
|
|
||
|
public event PreBeginPlay()
|
||
|
{
|
||
|
Super.PreBeginPlay();
|
||
|
|
||
|
if (WorldInfo.NetMode == NM_Client) return;
|
||
|
|
||
|
foreach WorldInfo.DynamicActors(class'SkinReplicator', SkinReplicator)
|
||
|
{
|
||
|
break;
|
||
|
}
|
||
|
|
||
|
if (SkinReplicator == None)
|
||
|
{
|
||
|
SkinReplicator = WorldInfo.Spawn(class'SkinReplicator');
|
||
|
}
|
||
|
|
||
|
if (SkinReplicator == None)
|
||
|
{
|
||
|
`Log_Base("FATAL: Can't Spawn 'SkinReplicator'");
|
||
|
SafeDestroy();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public function AddMutator(Mutator Mut)
|
||
|
{
|
||
|
if (Mut == Self) return;
|
||
|
|
||
|
if (Mut.Class == Class)
|
||
|
SkinReplicatorMut(Mut).SafeDestroy();
|
||
|
else
|
||
|
Super.AddMutator(Mut);
|
||
|
}
|
||
|
|
||
|
public function NotifyLogin(Controller C)
|
||
|
{
|
||
|
SkinReplicator.NotifyLogin(C);
|
||
|
|
||
|
Super.NotifyLogin(C);
|
||
|
}
|
||
|
|
||
|
public function NotifyLogout(Controller C)
|
||
|
{
|
||
|
SkinReplicator.NotifyLogout(C);
|
||
|
|
||
|
Super.NotifyLogout(C);
|
||
|
}
|
||
|
|
||
|
DefaultProperties
|
||
|
{
|
||
|
|
||
|
}
|