fix exp gain for custom zeds
This commit is contained in:
parent
46c85f41a3
commit
5dffb9edea
17
ServerExtMut/Classes/KFGI_Access.uc
Normal file
17
ServerExtMut/Classes/KFGI_Access.uc
Normal file
@ -0,0 +1,17 @@
|
||||
class KFGI_Access extends Object
|
||||
within KFGameInfo;
|
||||
|
||||
// Bypass protected modifier for these lists
|
||||
|
||||
function bool IsCustomZed(class<KFPawn_Monster> 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
|
||||
{
|
||||
|
||||
}
|
@ -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';
|
||||
@ -110,6 +113,8 @@ function PostBeginPlay()
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user