From c5f195d3888075e4259a0694d881c0c3d75270a2 Mon Sep 17 00:00:00 2001 From: Extremelyd1 Date: Tue, 3 Oct 2023 22:39:11 +0200 Subject: [PATCH] Fix sharp shadow dealing damage to teammates --- HKMP/Animation/Effects/DashBase.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HKMP/Animation/Effects/DashBase.cs b/HKMP/Animation/Effects/DashBase.cs index cde3321..347bd2c 100644 --- a/HKMP/Animation/Effects/DashBase.cs +++ b/HKMP/Animation/Effects/DashBase.cs @@ -8,7 +8,7 @@ namespace Hkmp.Animation.Effects; /// /// Abstract base class for the animation effect of dashing. /// -internal abstract class DashBase : AnimationEffect { +internal abstract class DashBase : DamageAnimationEffect { /// public abstract override void Play(GameObject playerObject, bool[] effectInfo); @@ -123,7 +123,7 @@ protected void Play(GameObject playerObject, bool[] effectInfo, bool shadowDash, // Lastly, disable the player collider, since we are in a shadow dash // We only do this, if we don't have sharp shadow playerObject.GetComponent().enabled = false; - } else if (!ServerSettings.IsBodyDamageEnabled && ServerSettings.IsPvpEnabled) { + } else if (!ServerSettings.IsBodyDamageEnabled && ServerSettings.IsPvpEnabled && ShouldDoDamage) { // If body damage is disabled, but PvP is enabled and we are performing a sharp shadow dash // we need to enable the DamageHero component and move the player object to the correct layer // to allow the local player to collide with it