From a4bae91c18e2e54a51e8b277cf99e4d929f7dbf3 Mon Sep 17 00:00:00 2001 From: GenZmeY Date: Sun, 26 Dec 2021 04:46:30 +0300 Subject: [PATCH] lifespan fix --- MskGs/Classes/MskGsMut.uc | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/MskGs/Classes/MskGsMut.uc b/MskGs/Classes/MskGsMut.uc index 299e234..aabfc26 100644 --- a/MskGs/Classes/MskGsMut.uc +++ b/MskGs/Classes/MskGsMut.uc @@ -181,7 +181,6 @@ private function bool IsUID(String ID) function bool CheckRelevance(Actor Other) { local bool SuperRelevant; - local KFDroppedPickup DroppedPickup; SuperRelevant = super.CheckRelevance(Other); @@ -191,15 +190,14 @@ function bool CheckRelevance(Actor Other) return SuperRelevant; } - DroppedPickup = KFDroppedPickup(Other); - - // otherwise modify weapon lifespan - if (DroppedPickup != None) + // otherwise modify dosh or weapon lifespan + if (KFDroppedPickup_Cash(Other) != None) { - if (KFDroppedPickup_Cash(DroppedPickup) != None && DoshLifespan != 0) - DroppedPickup.Lifespan = DoshLifespan; - else if (WeapLifespan != 0) - DroppedPickup.Lifespan = WeapLifespan; + if (DoshLifespan != 0) Other.Lifespan = float(DoshLifespan); + } + else if (KFDroppedPickup(Other) != None) + { + if (WeapLifespan != 0) Other.Lifespan = float(WeapLifespan); } return SuperRelevant;