Merge pull request #3 from GenZmeY/short-name
add short alias for mutator
This commit is contained in:
commit
a95a3fb8d5
@ -1,60 +1 @@
|
||||
class AALMut extends KFMutator;
|
||||
|
||||
var private AAL AAL;
|
||||
|
||||
public simulated function bool SafeDestroy()
|
||||
{
|
||||
return (bPendingDelete || bDeleteMe || Destroy());
|
||||
}
|
||||
|
||||
public event PreBeginPlay()
|
||||
{
|
||||
Super.PreBeginPlay();
|
||||
|
||||
if (WorldInfo.NetMode == NM_Client) return;
|
||||
|
||||
foreach WorldInfo.DynamicActors(class'AAL', AAL)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (AAL == None)
|
||||
{
|
||||
AAL = WorldInfo.Spawn(class'AAL');
|
||||
}
|
||||
|
||||
if (AAL == None)
|
||||
{
|
||||
`Log_Base("FATAL: Can't Spawn 'AAL'");
|
||||
SafeDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
public function AddMutator(Mutator Mut)
|
||||
{
|
||||
if (Mut == Self) return;
|
||||
|
||||
if (Mut.Class == Class)
|
||||
AALMut(Mut).SafeDestroy();
|
||||
else
|
||||
Super.AddMutator(Mut);
|
||||
}
|
||||
|
||||
public function NotifyLogin(Controller C)
|
||||
{
|
||||
AAL.NotifyLogin(C);
|
||||
|
||||
Super.NotifyLogin(C);
|
||||
}
|
||||
|
||||
public function NotifyLogout(Controller C)
|
||||
{
|
||||
AAL.NotifyLogout(C);
|
||||
|
||||
Super.NotifyLogout(C);
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
||||
class AALMut extends Mut; // backward compatibility
|
||||
|
60
AAL/Classes/Mut.uc
Normal file
60
AAL/Classes/Mut.uc
Normal file
@ -0,0 +1,60 @@
|
||||
class Mut extends KFMutator;
|
||||
|
||||
var private AAL AAL;
|
||||
|
||||
public simulated function bool SafeDestroy()
|
||||
{
|
||||
return (bPendingDelete || bDeleteMe || Destroy());
|
||||
}
|
||||
|
||||
public event PreBeginPlay()
|
||||
{
|
||||
Super.PreBeginPlay();
|
||||
|
||||
if (WorldInfo.NetMode == NM_Client) return;
|
||||
|
||||
foreach WorldInfo.DynamicActors(class'AAL', AAL)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (AAL == None)
|
||||
{
|
||||
AAL = WorldInfo.Spawn(class'AAL');
|
||||
}
|
||||
|
||||
if (AAL == None)
|
||||
{
|
||||
`Log_Base("FATAL: Can't Spawn 'AAL'");
|
||||
SafeDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
public function AddMutator(Mutator M)
|
||||
{
|
||||
if (M == Self) return;
|
||||
|
||||
if (M.Class == Class)
|
||||
Mut(M).SafeDestroy();
|
||||
else
|
||||
Super.AddMutator(M);
|
||||
}
|
||||
|
||||
public function NotifyLogin(Controller C)
|
||||
{
|
||||
AAL.NotifyLogin(C);
|
||||
|
||||
Super.NotifyLogin(C);
|
||||
}
|
||||
|
||||
public function NotifyLogout(Controller C)
|
||||
{
|
||||
AAL.NotifyLogout(C);
|
||||
|
||||
Super.NotifyLogout(C);
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
@ -19,7 +19,7 @@ https://forums.tripwireinteractive.com/index.php?threads/whitelisting-mods-and-m
|
||||
[*]Add the following string to the [b][OnlineSubsystemSteamworks.KFWorkshopSteamworks][/b] section (create one if it doesn't exist):
|
||||
[b]ServerSubscribedWorkshopItems=2848836389[/b]
|
||||
[*]Start the server and wait until the mutator is downloading;
|
||||
[*]Add mutator to server start parameters: [b]?Mutator=AAL.AALMut[/b] and restart the server.
|
||||
[*]Add mutator to server start parameters: [b]?Mutator=AAL.Mut[/b] and restart the server.
|
||||
[/olist]
|
||||
|
||||
[h1]Important setup information[/h1]
|
||||
|
Loading…
Reference in New Issue
Block a user