1
0
KF2-Dev-Scripts/Engine/Classes/NavMeshPath_EnforceTwoWayEdges.uc

34 lines
911 B
Ucode
Raw Normal View History

2020-12-13 15:01:13 +00:00
/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
* only allows edges which have a corresponding edge back (filters out one-way situations)
*/
class NavMeshPath_EnforceTwoWayEdges extends NavMeshPathConstraint
native(AI);
cpptext
{
// Interface
virtual UBOOL EvaluatePath( FNavMeshEdgeBase* Edge, FNavMeshEdgeBase* PredecessorEdge, FNavMeshPolyBase* SrcPoly, FNavMeshPolyBase* DestPoly, const FNavMeshPathParams& PathParams, INT& out_PathCost, INT& out_HeuristicCost, const FVector& EdgePoint );
}
static function bool EnforceTwoWayEdges( NavigationHandle NavHandle )
{
local NavMeshPath_EnforceTwoWayEdges Con;
if( NavHandle != None )
{
Con = NavMeshPath_EnforceTwoWayEdges(NavHandle.CreatePathConstraint(default.class));
if( Con != None )
{
NavHandle.AddPathConstraint( Con );
return TRUE;
}
}
return FALSE;
}
defaultproperties
{
}