diff --git a/MskGs/Classes/KFGameInfoHelper.uc b/MskGs/Classes/KFGameInfoHelper.uc index b39841c..fa4324c 100644 --- a/MskGs/Classes/KFGameInfoHelper.uc +++ b/MskGs/Classes/KFGameInfoHelper.uc @@ -1,6 +1,6 @@ class KFGameInfoHelper extends Object; -public static function UpdateGameSettings(KFGameInfo_Survival KFGI, bool bUsesStats, string GameModeClass) +public static function UpdateGameSettings(KFGameInfo_Survival KFGI, bool bUsesStats, string GameModeClass, MskGsMut Mut) { local name SessionName; local KFOnlineGameSettings KFGameSettings; @@ -51,7 +51,19 @@ public static function UpdateGameSettings(KFGameInfo_Survival KFGI, bool bUsesSt { KFGameSettings.NumWaves = KFGI.WaveMax - 1; } - KFGameSettings.OwningPlayerName = class'GameReplicationInfo'.default.ServerName; + + if (Mut == NONE || Mut.MskGsMemberList.Length == 0) + { + KFGameSettings.OwningPlayerName = class'GameReplicationInfo'.default.ServerName; + } + else if (Mut.MskGsMemberList.Length > 10) + { + KFGameSettings.OwningPlayerName = class'GameReplicationInfo'.default.ServerName @ "(+50% XP)"; + } + else + { + KFGameSettings.OwningPlayerName = class'GameReplicationInfo'.default.ServerName @ "(+" $ Mut.MskGsMemberList.Length * 5 $ "% XP)"; + } KFGameSettings.NumPublicConnections = KFGI.MaxPlayersAllowed; KFGameSettings.bRequiresPassword = KFGI.RequiresPassword(); diff --git a/MskGs/Classes/MskGsMut.uc b/MskGs/Classes/MskGsMut.uc index 80f6c49..7e98c5f 100644 --- a/MskGs/Classes/MskGsMut.uc +++ b/MskGs/Classes/MskGsMut.uc @@ -4,11 +4,7 @@ Class MskGsMut extends KFMutator const CurrentVersion = 3; var config int ConfigVersion; -var config bool bEnableMapStats; -var config string SortStats; -var config bool bOfficialNextMapOnly; -var config bool bRandomizeNextMap; -var config int WeapLifespan; +var config bool bEnableMapStats; var config string SortStats; var config bool bOfficialNextMapOnly; var config bool bRandomizeNextMap; var config int WeapLifespan; var config int DoshLifespan; var config array KickProtectedList; @@ -22,23 +18,7 @@ var array RepClients; var array MskGsMemberList; var array AdminUIDList; -function InitMutator(string Options, out string ErrorMessage) -{ - local int MaxPlayers, MaxPlayersAllowed; - - super.InitMutator(Options, ErrorMessage); - - if (MyKFGI == none) - { - `log("[MskGsMut] Error: can't init, MyKFGI is none"); - return; - } - - MaxPlayers = Clamp(MyKFGI.GetIntOption(Options, "MaxPlayers", MaxPlayers), 6, 128); - MaxPlayersAllowed = MaxPlayers; - MyKFGI.MaxPlayers = MaxPlayers; - MyKFGI.MaxPlayersAllowed = MaxPlayersAllowed; -} +function InitMutator(string Options, out string ErrorMessage) { local int MaxPlayers, MaxPlayersAllowed; super.InitMutator(Options, ErrorMessage); if (MyKFGI == none) { `log("[MskGsMut] Error: can't init, MyKFGI is none"); return; } MaxPlayers = Clamp(MyKFGI.GetIntOption(Options, "MaxPlayers", MaxPlayers), 6, 128); MaxPlayersAllowed = MaxPlayers; MyKFGI.MaxPlayers = MaxPlayers; MyKFGI.MaxPlayersAllowed = MaxPlayersAllowed; } function InitConfig() { @@ -292,6 +272,7 @@ function AddMskGsMember(Controller C) WorldInfo.Game.Broadcast(C, "XP bonus: +"$string(MskGsMemberList.Length * 5)$"%"); } } + MyKFGI.UpdateGameSettings(); } function NotifyLogin(Controller C) @@ -350,6 +331,7 @@ function NotifyLogout(Controller C) WorldInfo.Game.Broadcast(C, "No XP bonus now."); } } + MyKFGI.UpdateGameSettings(); for (i = RepClients.Length - 1; i >= 0; i--) { diff --git a/MskGs/Classes/MskGs_Endless.uc b/MskGs/Classes/MskGs_Endless.uc index aa8a1db..e8e8a48 100644 --- a/MskGs/Classes/MskGs_Endless.uc +++ b/MskGs/Classes/MskGs_Endless.uc @@ -11,7 +11,7 @@ simulated function ExileServerUsingKickBan() function UpdateGameSettings() { - KFGIH.static.UpdateGameSettings(Self, !IsUnrankedGame(), "KFGameContent.KFGameInfo_Endless"); + KFGIH.static.UpdateGameSettings(Self, !IsUnrankedGame(), "KFGameContent.KFGameInfo_Endless", Mut); } protected function DistributeMoneyAndXP(class MonsterClass, const out array DamageHistory, Controller Killer) diff --git a/MskGs/Classes/MskGs_Objective.uc b/MskGs/Classes/MskGs_Objective.uc index 7df05dd..92b5348 100644 --- a/MskGs/Classes/MskGs_Objective.uc +++ b/MskGs/Classes/MskGs_Objective.uc @@ -12,7 +12,7 @@ simulated function ExileServerUsingKickBan() function UpdateGameSettings() { - KFGIH.static.UpdateGameSettings(Self, !IsUnrankedGame(), "KFGameContent.KFGameInfo_Objective"); + KFGIH.static.UpdateGameSettings(Self, !IsUnrankedGame(), "KFGameContent.KFGameInfo_Objective", Mut); } protected function DistributeMoneyAndXP(class MonsterClass, const out array DamageHistory, Controller Killer) diff --git a/MskGs/Classes/MskGs_Survival.uc b/MskGs/Classes/MskGs_Survival.uc index 26eb777..827c2a4 100644 --- a/MskGs/Classes/MskGs_Survival.uc +++ b/MskGs/Classes/MskGs_Survival.uc @@ -11,7 +11,7 @@ simulated function ExileServerUsingKickBan() function UpdateGameSettings() { - KFGIH.static.UpdateGameSettings(Self, !IsUnrankedGame(), "KFGameContent.KFGameInfo_Survival"); + KFGIH.static.UpdateGameSettings(Self, !IsUnrankedGame(), "KFGameContent.KFGameInfo_Survival", Mut); } protected function DistributeMoneyAndXP(class MonsterClass, const out array DamageHistory, Controller Killer) diff --git a/MskGs/Classes/MskGs_VersusSurvival.uc b/MskGs/Classes/MskGs_VersusSurvival.uc index d38ce0f..f6cdc54 100644 --- a/MskGs/Classes/MskGs_VersusSurvival.uc +++ b/MskGs/Classes/MskGs_VersusSurvival.uc @@ -12,7 +12,7 @@ simulated function ExileServerUsingKickBan() function UpdateGameSettings() { - KFGIH.static.UpdateGameSettings(Self, !IsUnrankedGame(), "KFGameContent.KFGameInfo_VersusSurvival"); + KFGIH.static.UpdateGameSettings(Self, !IsUnrankedGame(), "KFGameContent.KFGameInfo_VersusSurvival", Mut); } protected function DistributeMoneyAndXP(class MonsterClass, const out array DamageHistory, Controller Killer) diff --git a/MskGs/Classes/MskGs_WeeklySurvival.uc b/MskGs/Classes/MskGs_WeeklySurvival.uc index 9945075..4d426c5 100644 --- a/MskGs/Classes/MskGs_WeeklySurvival.uc +++ b/MskGs/Classes/MskGs_WeeklySurvival.uc @@ -12,7 +12,7 @@ simulated function ExileServerUsingKickBan() function UpdateGameSettings() { - KFGIH.static.UpdateGameSettings(Self, !IsUnrankedGame(), "KFGameContent.KFGameInfo_WeeklySurvival"); + KFGIH.static.UpdateGameSettings(Self, !IsUnrankedGame(), "KFGameContent.KFGameInfo_WeeklySurvival", Mut); } protected function DistributeMoneyAndXP(class MonsterClass, const out array DamageHistory, Controller Killer)