实体
寻路 CPathFind
查看 MarkdownThePaths 搜路与路径节点
CPathFind.h · 全局 ThePaths
车 / 人路径节点。搜路参数多,先小范围试。
从起点到终点填节点序列。
void DoPathSearch(unsigned char pathType, CVector origin, CNodeAddress originAddr,
CVector target, CNodeAddress* pResultNodes, short* pNodesCount, int maxNodesToFind, float* pDistance,
float maxSearchDistance, CNodeAddress* targetAddr, float maxUnkLimit, bool oneSideOnly,
CNodeAddress forbiddenNodeAddr, bool includeNodesWithoutLinks, bool waterPath);用 CNodeAddress 取 CPathNode*。
CPathNode* GetPathNode(CNodeAddress address);按位置拉路径区。
void SetPathsNeededAtPosition(const CVector& pos);
void UpdateStreaming(bool bForceStreaming);bool IsWaterNodeNearby(CVector position, float radius);脚本车绕行相关。
unsigned int m_dwNumForbiddenAreas;
CForbiddenArea m_aForbiddenAreas[64];
bool m_bForbiddenForScriptedCarsEnabled;
float m_fForbiddenForScrCarsX1; // X2 Y1 Y2随机车挂节点见 CCarCtrl。本对象只持图数据与搜路。
评论