Refactor to simplify
`CheckAmmoPickup` effectively only contained another function call and itself was only called once. As it also didn't add to readbility, it needed to be removed.
This commit is contained in:
parent
dc6a28224a
commit
c2942b6323
@ -33,7 +33,8 @@ static function bool CheckReplacement(Actor other, out byte isSuperRelevant)
|
||||
return false;
|
||||
}
|
||||
CheckAbusableWeapon(KFWeapon(other));
|
||||
CheckAmmoPickup(KFAmmoPickup(other));
|
||||
// If it's ammo pickup - we need to stalk it
|
||||
class'AmmoPickupStalker'.static.StalkAmmoPickup(KFAmmoPickup(other));
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -46,12 +47,6 @@ private static function CheckAbusableWeapon(KFWeapon newWeapon)
|
||||
ammoSellingFix.FixWeapon(newWeapon);
|
||||
}
|
||||
|
||||
private static final function CheckAmmoPickup(KFAmmoPickup newAmmoPickup)
|
||||
{
|
||||
if (newAmmoPickup == none) return;
|
||||
class'AmmoPickupStalker'.static.StalkAmmoPickup(newAmmoPickup);
|
||||
}
|
||||
|
||||
// This function recreates the logic of 'KFWeapon.DropFrom()',
|
||||
// since standard 'ReplaceWith' function produces bad results.
|
||||
private static function ReplacePickupWith(Pickup oldPickup)
|
||||
|
Reference in New Issue
Block a user