From b4b2211baba65602ffdc4f13d5d077dcda026981 Mon Sep 17 00:00:00 2001 From: "theastropath@gmail.com" Date: Fri, 7 Jul 2023 10:09:17 -0400 Subject: [PATCH] Grenades will no longer immediately explode when they touch a carcass (fixes #474) --- DXRBalance/DeusEx/Classes/ThrownProjectile.uc | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/DXRBalance/DeusEx/Classes/ThrownProjectile.uc b/DXRBalance/DeusEx/Classes/ThrownProjectile.uc index 425b6a89e..397298b9e 100644 --- a/DXRBalance/DeusEx/Classes/ThrownProjectile.uc +++ b/DXRBalance/DeusEx/Classes/ThrownProjectile.uc @@ -121,3 +121,26 @@ state Exploding } } + +auto simulated state Flying +{ + simulated function ProcessTouch (Actor Other, Vector HitLocation) + { + if (bStuck) + return; + + if ((Other != instigator) && (DeusExProjectile(Other) == None) && + (Other != Owner) && DeusExCarcass(Other)==None) //Ignore carcasses + { + damagee = Other; + Explode(HitLocation, Normal(HitLocation-damagee.Location)); + + // DEUS_EX AMSD Spawn blood server side only + if (Role == ROLE_Authority) + { + if (damagee.IsA('Pawn') && !damagee.IsA('Robot') && bBlood) + SpawnBlood(HitLocation, Normal(HitLocation-damagee.Location)); + } + } + } +}