mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- fix bug with 06ee21c51d
- if (!pl) should always return false
This commit is contained in:
parent
ca6a2152b9
commit
664ccf8a7c
1 changed files with 5 additions and 2 deletions
|
@ -268,7 +268,10 @@ int P_CheckMeleeRange (AActor* actor, double range)
|
|||
AActor *pl = actor->target;
|
||||
|
||||
double dist;
|
||||
|
||||
|
||||
if (!pl)
|
||||
return false;
|
||||
|
||||
dist = actor->Distance2D (pl);
|
||||
if (range < 0) range = actor->meleerange;
|
||||
|
||||
|
@ -279,7 +282,7 @@ int P_CheckMeleeRange (AActor* actor, double range)
|
|||
if (pl == actor->goal)
|
||||
return true;
|
||||
|
||||
if (!pl || (actor->Sector->Flags & SECF_NOATTACK))
|
||||
if (actor->Sector->Flags & SECF_NOATTACK)
|
||||
return false;
|
||||
|
||||
// [RH] Don't melee things too far above or below actor.
|
||||
|
|
Loading…
Reference in a new issue