and CustomXP optimization (?)
This commit is contained in:
inklesspen_rus 2021-01-09 13:26:05 +03:00
parent 5a8b04c913
commit 60ba914cef
3 changed files with 7 additions and 11 deletions

View File

@ -146,6 +146,7 @@ function ApplyPerk(Ext_PerkBase P)
ModifyHealth(HP.HealthMax);
ModifyArmor(HP.MaxArmor);
CurrentPerk.UpdateAmmoStatus(HP.InvManager);
if (HP.Health > HP.HealthMax) HP.Health = HP.HealthMax;
if (HP.Armor > HP.MaxArmor) HP.Armor = HP.MaxArmor;

View File

@ -1372,7 +1372,7 @@ final function UpdateAmmoStatus(InventoryManager Inv)
foreach Inv.InventoryActors(class'KFWeapon',W)
{
if (IsWeaponOnPerk(W))
// if (IsWeaponOnPerk(W))
W.ReInitializeAmmoCounts(PerkManager);
}
}

View File

@ -606,17 +606,12 @@ function CustomXP(Controller Killer, Controller Killed)
KFPC = KFPlayerController(DamagerKFPRI.Owner);
if (KFPC != none)
{
XP = 0;
for (j = 0; j < CustomZedXPArray.Length; j++)
{
if (KFM.Class == CustomZedXPArray[j].zedclass)
j = CustomZedXPArray.Find('zedclass', KFM.Class);
if(j != -1)
{
XP = CustomZedXPArray[j].XPValues[MyKFGI.GameDifficulty];
break;
}
}
if (XP == 0)
else
{
XP = KFM.static.GetXPValue(MyKFGI.GameDifficulty);
}