mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
Extra safety checks.
This commit is contained in:
parent
5abd7e1ebf
commit
257ddb520a
2 changed files with 3 additions and 2 deletions
|
@ -2589,7 +2589,7 @@ static bool FindPathAStar(AActor *chaser, AActor* startnode, AActor* goalnode, T
|
||||||
|
|
||||||
bool FLevelLocals::FindPath(AActor* chaser, AActor* target, AActor* startNode, AActor* goalNode)
|
bool FLevelLocals::FindPath(AActor* chaser, AActor* target, AActor* startNode, AActor* goalNode)
|
||||||
{
|
{
|
||||||
if (!chaser || !target)
|
if (!chaser || !target || PathNodes.Size() < 1)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2232,7 +2232,8 @@ DEFINE_ACTION_FUNCTION(AActor, ClearPath)
|
||||||
|
|
||||||
bool AActor::CanPathfind()
|
bool AActor::CanPathfind()
|
||||||
{
|
{
|
||||||
if ((!(flags9 & MF9_NOPATHING) && !(Sector->MoreFlags & SECMF_NOPATHING)) &&
|
if (Level->PathNodes.Size() > 0 &&
|
||||||
|
(!(flags9 & MF9_NOPATHING) && !(Sector->MoreFlags & SECMF_NOPATHING)) &&
|
||||||
(flags9 & MF9_PATHING || Level->flags3 & LEVEL3_PATHING))
|
(flags9 & MF9_PATHING || Level->flags3 & LEVEL3_PATHING))
|
||||||
{
|
{
|
||||||
if ((flags6 & MF6_NOFEAR))
|
if ((flags6 & MF6_NOFEAR))
|
||||||
|
|
Loading…
Reference in a new issue