diff --git a/ServerExtMut/Classes/ServerExtMut.uc b/ServerExtMut/Classes/ServerExtMut.uc index 696be4f..ce8f21f 100644 --- a/ServerExtMut/Classes/ServerExtMut.uc +++ b/ServerExtMut/Classes/ServerExtMut.uc @@ -10,6 +10,14 @@ struct FInventory var class ItemClass; var int Values[4]; }; +struct CFGCustomZedXP +{ + var string zed; // zed name + var float XP1; // normal + var float XP2; // hard + var float XP3; // suicidal + var float XP4; // hoe +}; struct FSavedInvEntry { var Controller OwnerPlayer; @@ -19,6 +27,7 @@ struct FSavedInvEntry var array PlayerInv; var config array PerkClasses,CustomChars,AdminCommands,CustomItems,BonusGameSongs,BonusGameFX; +var config array CustomZedXP; var array< class > LoadedPerks; var array CustomCharList; var ExtPlayerStat ServerStatLoader; @@ -55,6 +64,14 @@ var config bool bDontUseOriginalWeaponry; var config bool bAllowStandartPistolUpgrade; var config bool bDisableCustomTrader; +//Custom XP lightly array +struct CustomZedXPStruct +{ + var class zedclass; + var float XPValues[4]; +}; +var array CustomZedXPArray; + function PostBeginPlay() { local xVotingHandler MV; @@ -66,6 +83,7 @@ function PostBeginPlay() local Object O; local string S; local bool bLock; + local CustomZedXPStruct zedxp; Super.PostBeginPlay(); if( WorldInfo.Game.BaseMutator==None ) @@ -242,10 +260,32 @@ function PostBeginPlay() if( bDumpXMLStats ) FileOutput = Spawn(class'ExtXMLOutput'); + UpdateCustomZedXPArray() // Causes bugs // SetTimer(0.1,'CheckPickupFactories') } +function UpdateCustomZedXPArray() +{ + CustomZedXPArray.Length = 0; + // Custom XP for custom zeds + for(i=0;i(DynamicLoadObject(CustomZedXP[i].zed,Class'Class')); + if(zedxp.zedclass == none) + { + `log("Error loading"@CustomZedXP[i].zed); + continue; + } + zedxp.XPValues[0] = CustomZedXP[i].XP1; + zedxp.XPValues[1] = CustomZedXP[i].XP2; + zedxp.XPValues[2] = CustomZedXP[i].XP3; + zedxp.XPValues[3] = CustomZedXP[i].XP4; + CustomZedXPArray.AddItem(zedxp); + `log("CustomXP: Loaded"@PathName(zedxp.zedclass)); + } +} + // function CheckPickupFactories() // { // local KFPickupFactory_Item ItemFactory; @@ -557,14 +597,28 @@ function ScoreKill(Controller Killer, Controller Killed) KFPC = KFPlayerController(DamagerKFPRI.Owner); if( KFPC != none ) { + `log("ScoreKill:"@PathName(KFM)); + + XP = 0; + for(j=0;j