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 bAllowStandartPistolUpgrade;
|
||||||
var config bool bDisableCustomTrader;
|
var config bool bDisableCustomTrader;
|
||||||
|
|
||||||
|
var KFGI_Access KFGIA;
|
||||||
|
|
||||||
//Custom XP lightly array
|
//Custom XP lightly array
|
||||||
struct CustomZedXPStruct
|
struct CustomZedXPStruct
|
||||||
{
|
{
|
||||||
@ -102,6 +104,7 @@ function PostBeginPlay()
|
|||||||
class'OnlineSubsystem'.Static.StringToUniqueNetId(DevList[i],Id);
|
class'OnlineSubsystem'.Static.StringToUniqueNetId(DevList[i],Id);
|
||||||
DevNetID[i] = Id;
|
DevNetID[i] = Id;
|
||||||
}
|
}
|
||||||
|
|
||||||
ServerStatLoader = new (None) class'ExtPlayerStat';
|
ServerStatLoader = new (None) class'ExtPlayerStat';
|
||||||
WorldInfo.Game.HUDType = class'KFExtendedHUD';
|
WorldInfo.Game.HUDType = class'KFExtendedHUD';
|
||||||
WorldInfo.Game.PlayerControllerClass = class'ExtPlayerController';
|
WorldInfo.Game.PlayerControllerClass = class'ExtPlayerController';
|
||||||
@ -109,6 +112,8 @@ function PostBeginPlay()
|
|||||||
WorldInfo.Game.DefaultPawnClass = class'ExtHumanPawn';
|
WorldInfo.Game.DefaultPawnClass = class'ExtHumanPawn';
|
||||||
KFGameInfo(WorldInfo.Game).CustomizationPawnClass = class'ExtPawn_Customization';
|
KFGameInfo(WorldInfo.Game).CustomizationPawnClass = class'ExtPawn_Customization';
|
||||||
KFGameInfo(WorldInfo.Game).KFGFxManagerClass = class'ExtMoviePlayer_Manager';
|
KFGameInfo(WorldInfo.Game).KFGFxManagerClass = class'ExtMoviePlayer_Manager';
|
||||||
|
|
||||||
|
KFGIA = new(KFGameInfo(WorldInfo.Game)) class'KFGI_Access';
|
||||||
|
|
||||||
// trader things
|
// trader things
|
||||||
if (!bDisableCustomTrader && CustomTrader==None)
|
if (!bDisableCustomTrader && CustomTrader==None)
|
||||||
@ -553,7 +558,7 @@ function CustomXP(Controller Killer, Controller Killed)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (cont && !IsFromMod(KFM))
|
if (cont && !KFGIA.IsCustomZed(KFM.class))
|
||||||
{
|
{
|
||||||
// No mods - exit the loop, the game will add experience by itself
|
// No mods - exit the loop, the game will add experience by itself
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user