Skip to content

Commit

Permalink
- allow notification of actor goal is reached inside of a SECF_NOATTA…
Browse files Browse the repository at this point in the history
…CK sector
  • Loading branch information
madame-rachelle committed Sep 3, 2022
1 parent ba83879 commit 06ee21c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/playsim/p_enemy.cpp
Expand Up @@ -269,9 +269,6 @@ int P_CheckMeleeRange (AActor* actor, double range)

double dist;

if (!pl || (actor->Sector->Flags & SECF_NOATTACK))
return false;

dist = actor->Distance2D (pl);
if (range < 0) range = actor->meleerange;

Expand All @@ -282,6 +279,9 @@ int P_CheckMeleeRange (AActor* actor, double range)
if (pl == actor->goal)
return true;

if (!pl || (actor->Sector->Flags & SECF_NOATTACK))
return false;

// [RH] Don't melee things too far above or below actor.
if (!(actor->flags5 & MF5_NOVERTICALMELEERANGE))
{
Expand Down

0 comments on commit 06ee21c

Please sign in to comment.