Skip to content

Commit

Permalink
Fix sharp shadow dealing damage to teammates
Browse files Browse the repository at this point in the history
  • Loading branch information
Extremelyd1 committed Oct 3, 2023
1 parent 57a25b5 commit c5f195d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions HKMP/Animation/Effects/DashBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Hkmp.Animation.Effects;
/// <summary>
/// Abstract base class for the animation effect of dashing.
/// </summary>
internal abstract class DashBase : AnimationEffect {
internal abstract class DashBase : DamageAnimationEffect {
/// <inheritdoc/>
public abstract override void Play(GameObject playerObject, bool[] effectInfo);

Expand Down Expand Up @@ -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<BoxCollider2D>().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
Expand Down

0 comments on commit c5f195d

Please sign in to comment.