Closed KitRifty closed 2 years ago
Good job on exposing the rest of the natives.
As for the problem you raise regarding NavPathCostFunctor
, it comes from CBaseNPC early days, when extension used to be a very small library, only focused on exposing pathfollower to its plugin.
Thankfully NavPathCostFunctor
is a typeset, and there shouldn't be many projects out there making use of it. It should be safe to rename NavPathCostFunctor
to PathFollowerNavPathCostFunctor
, without breaking backwards compatibility, and make a new NavPathCostFunctor
without INextBot
param.
I’ll try that then, thanks. PathFollowerNavPathCostFunctor
seems like a mouthful, though. Would PathFollowerCostFunctor
be sufficient instead?
Fixes:
CNavArea.SetCostSoFar
not being registered to nativesCNavArea.GetSizeX/Y
not defined in includesAdditions:
TheNavMesh.BuildPath
CNavArea.Get/SetTotalCost
CNavArea.Get/SetPathLengthSoFar
CNavArea.ComputePortal
CNavArea.ComputeClosestPointInPortal
CNavArea.GetClosestPointOnArea
CNavArea.ComputeAdjacentConnectionHeightChange
CNavArea.IsOverlappingPoint
CNavArea.IsOverlappingArea
CNavArea.IsOverlappingExtent
CNavArea.GetDistanceSquaredToPoint
CNavArea.IsEntirelyVisible
CNavArea.IsPartiallyVisible
CNavArea.IsPotentiallyVisible
CNavArea.IsCompletelyVisible
One thing I'm not sure of is handlingAddedSMPathCost
. Since this exposesNavAreaBuildPath
as theTheNavMesh.BuildPath
native, it requires a generic path cost function, butNavPathCostFunctor
typeset has aINextBot
argument. I figured that to ensure backwards compatibility, I kept the typeset the same, and inBuildPath
'sSMPathCost
object, I passnullptr
as theINextBot
argument.PathFollowerCostFunctor
.Tested and working on Windows.