Menus overhaul #14

Merged
dkanus merged 30 commits from :somechanges into master 2022-01-23 22:14:51 +03:00
Showing only changes of commit c2fa773fae - Show all commits

View File

@ -899,42 +899,46 @@ function BileDamageEffect( int damage,
NextBileTime = Level.TimeSeconds + BileFrequency; NextBileTime = Level.TimeSeconds + BileFrequency;
} }
} }
function float GetDecapDamageModifier( class<NiceWeaponDamageType> damageType, function float GetDecapDamageModifier( class<NiceWeaponDamageType> damageType,
NicePlayerController nicePlayer, NicePlayerController nicePlayer,
KFPlayerReplicationInfo KFPRI){ KFPlayerReplicationInfo KFPRI)
local float damageMod; {
local bool shouldDoGoodDecap; local float damageMod;
local bool hasTrashCleaner; local bool shouldDoGoodDecap;
local bool isPerkedPickup; local bool hasTrashCleaner;
local class<NiceWeaponPickup> pickupClass; local bool isPerkedPickup;
local class<NiceVeterancyTypes> niceVet; local class<NiceWeaponPickup> pickupClass;
niceVet = class<NiceVeterancyTypes>(KFPRI.ClientVeteranSkill); local class<NiceVeterancyTypes> niceVet;
isPerkedPickup = false;
if(niceVet != none){ // KFPRI accessed none fix
pickupClass = niceVet.static.GetPickupFromDamageType(damageType); if (KFPRI != none)
if(pickupClass != none) niceVet = class<NiceVeterancyTypes>(KFPRI.ClientVeteranSkill);
isPerkedPickup = niceVet.static.IsPerkedPickup(pickupClass); isPerkedPickup = false;
} if (niceVet != none)
shouldDoGoodDecap = false; {
shouldDoGoodDecap = (damageType.default.decapType == DB_DROP); pickupClass = niceVet.static.GetPickupFromDamageType(damageType);
shouldDoGoodDecap = shouldDoGoodDecap || if (pickupClass != none)
isPerkedPickup = niceVet.static.IsPerkedPickup(pickupClass);
}
shouldDoGoodDecap = false;
shouldDoGoodDecap = (damageType.default.decapType == DB_DROP);
shouldDoGoodDecap = shouldDoGoodDecap ||
(damageType.default.decapType == DB_PERKED && isPerkedPickup); (damageType.default.decapType == DB_PERKED && isPerkedPickup);
if(shouldDoGoodDecap) if (shouldDoGoodDecap)
damageMod = damageType.default.goodDecapMod; damageMod = damageType.default.goodDecapMod;
else else
damageMod = damageType.default.badDecapMod; damageMod = damageType.default.badDecapMod;
if(nicePlayer != none) if (nicePlayer != none)
hasTrashCleaner = class'NiceVeterancyTypes'.static. hasTrashCleaner = class'NiceVeterancyTypes'.static.
hasSkill(nicePlayer, class'NiceSkillCommandoTrashCleaner'); hasSkill(nicePlayer, class'NiceSkillCommandoTrashCleaner');
if(hasTrashCleaner){ if (hasTrashCleaner)
damageMod = FMin( {
damageMod, damageMod = FMin(damageMod, class'NiceSkillCommandoTrashCleaner'.default.decapitationMultiLimit);
class'NiceSkillCommandoTrashCleaner'.default. }
decapitationMultiLimit return damageMod;
);
}
return damageMod;
} }
function DealDecapDamage( int damage, function DealDecapDamage( int damage,
Pawn instigatedBy, Pawn instigatedBy,
Vector hitLocation, Vector hitLocation,