diff --git a/ServerExtMut/Classes/KFGI_Access.uc b/ServerExtMut/Classes/KFGI_Access.uc new file mode 100644 index 0000000..e4c7ab8 --- /dev/null +++ b/ServerExtMut/Classes/KFGI_Access.uc @@ -0,0 +1,17 @@ +class KFGI_Access extends Object + within KFGameInfo; + +// Bypass protected modifier for these lists + +function bool IsCustomZed(class KFPM) +{ + if (AIClassList.Find(KFPM) != INDEX_NONE) return false; + if (NonSpawnAIClassList.Find(KFPM) != INDEX_NONE) return false; + if (AIBossClassList.Find(KFPM) != INDEX_NONE) return false; + return true; +} + +defaultproperties +{ + +} diff --git a/ServerExtMut/Classes/ServerExtMut.uc b/ServerExtMut/Classes/ServerExtMut.uc index 389745c..853b85a 100644 --- a/ServerExtMut/Classes/ServerExtMut.uc +++ b/ServerExtMut/Classes/ServerExtMut.uc @@ -63,6 +63,8 @@ var config bool bDontUseOriginalWeaponry; var config bool bAllowStandartPistolUpgrade; var config bool bDisableCustomTrader; +var KFGI_Access KFGIA; + //Custom XP lightly array struct CustomZedXPStruct { @@ -102,6 +104,7 @@ function PostBeginPlay() class'OnlineSubsystem'.Static.StringToUniqueNetId(DevList[i],Id); DevNetID[i] = Id; } + ServerStatLoader = new (None) class'ExtPlayerStat'; WorldInfo.Game.HUDType = class'KFExtendedHUD'; WorldInfo.Game.PlayerControllerClass = class'ExtPlayerController'; @@ -109,6 +112,8 @@ function PostBeginPlay() WorldInfo.Game.DefaultPawnClass = class'ExtHumanPawn'; KFGameInfo(WorldInfo.Game).CustomizationPawnClass = class'ExtPawn_Customization'; KFGameInfo(WorldInfo.Game).KFGFxManagerClass = class'ExtMoviePlayer_Manager'; + + KFGIA = new(KFGameInfo(WorldInfo.Game)) class'KFGI_Access'; // trader things if (!bDisableCustomTrader && CustomTrader==None) @@ -553,7 +558,7 @@ function CustomXP(Controller Killer, Controller Killed) break; } } - if (cont && !IsFromMod(KFM)) + if (cont && !KFGIA.IsCustomZed(KFM.class)) { // No mods - exit the loop, the game will add experience by itself continue;