mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-16 17:21:10 +00:00
- Fixed: Fear checks were incorrect when accounting for player being present or not.
This commit is contained in:
parent
4682b7172e
commit
6d99395b68
1 changed files with 10 additions and 6 deletions
|
@ -2245,14 +2245,18 @@ bool AActor::CanPathfind()
|
|||
return true;
|
||||
|
||||
// Can't pathfind while feared.
|
||||
if (!(flags4 & MF4_FRIGHTENED))
|
||||
{
|
||||
if (!target)
|
||||
return true;
|
||||
if (flags4 & MF4_FRIGHTENED)
|
||||
return false;
|
||||
|
||||
if (!target->flags8 & MF8_FRIGHTENING)
|
||||
return (!target->player || !(target->player->cheats & CF_FRIGHTENING));
|
||||
if (target)
|
||||
{
|
||||
if (target->flags8 & MF8_FRIGHTENING)
|
||||
return false;
|
||||
|
||||
if (target->player && target->player->cheats & CF_FRIGHTENING)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue