-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from GenZmeY/short-name
add short alias for mutator
- Loading branch information
Showing
3 changed files
with
62 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters