mutator code cleanup

This commit is contained in:
Shtoyan 2022-03-03 15:07:18 +04:00
parent 406257c0e9
commit 74700d7f20
3 changed files with 13 additions and 12 deletions

View File

@ -325,6 +325,11 @@ defaultproperties
{
GameName="Nice Floor"
Description="Nice Edition of ScrN Killing Floor game mode (ScrnGameType)."
// custom player controller
PlayerControllerClass=class'NicePlayerController'
PlayerControllerClassName="NicePack.NicePlayerController"
// skills menu
LoginMenuClass="NicePack.NiceInvasionLoginMenu"
ZedTimeSlomoScale=0.4
LesserZedTimeSlomoScale=0.6
}

View File

@ -188,25 +188,20 @@ simulated function PostBeginPlay()
// Find game type and ScrN mutator
ScrnGT = ScrnGameType(Level.Game);
NiceGT = NiceGameType(Level.Game);
if(ScrnGT == none){
Log("ERROR: Wrong GameType (requires at least ScrnGameType)", Class.Outer.Name);
if (NiceGT == none)
{
Log("ERROR: Wrong GameType (requires NiceGameType)", class.Outer.Name);
Destroy();
return;
}
// Skills menu
ScrnGT.LoginMenuClass = string(class'NiceInvasionLoginMenu');
if(NiceGT != none)
NiceGT.RegisterMutator(Self);
ScrnMut = ScrnGT.ScrnBalanceMut;
// FIXME poosh forces this variable in his mutator...
NiceGT.LoginMenuClass = "NicePack.NiceInvasionLoginMenu";
NiceGT.RegisterMutator(self);
ScrnMut = NiceGT.ScrnBalanceMut;
if(bReplacePickups)
ScrnMut.bReplacePickups = false;
// Replication of some variables
SetReplicationData();
// New player controller class
if(!ClassIsChildOf(ScrnGT.PlayerControllerClass, class'NicePlayerController')){
ScrnGT.PlayerControllerClass = class'NicePlayerController';
ScrnGT.PlayerControllerClassName = string(class'NicePlayerController');
}
// Game rules
GameRules = Spawn(class'NiceRules', self);
// -- Lower starting HL

View File

@ -1537,6 +1537,7 @@ function ClientLocationalVoiceMessage(PlayerReplicationInfo Sender,
defaultproperties
{
MidGameMenuClass="NicePack.NiceInvasionLoginMenu"
nicePlayerInfoVersionNumber=1
bAltSwitchesModes=True
bAdvReloadCheck=True