Bazaar developer reference

JoinArea(CvAStarNode *, CvAStarNode *, int, const void *, CvAStar *)

Defined in
CvAStar.cpp, line 2741
Hook name
CivHooks::JoinArea

Hooks

static bool BeforeJoinArea(CvAStarNode* parent, CvAStarNode* node, int data, const void* pointer, CvAStar* finder, int& result);static void AfterJoinArea(CvAStarNode* parent, CvAStarNode* node, int data, const void* pointer, CvAStar* finder, int& result);static int ReplaceJoinArea(int (*original)(CvAStarNode*, CvAStarNode*, int, const void*, CvAStar*), CvAStarNode* parent, CvAStarNode* node, int data, const void* pointer, CvAStar* finder);CivRegisterBefore<CivHooks::JoinArea>(host, &BeforeJoinArea);CivRegisterAfter<CivHooks::JoinArea>(host, &AfterJoinArea);CivRegisterReplace<CivHooks::JoinArea>(host, &ReplaceJoinArea);

Code

2740/// Area path finder - callback routine when node added to open/closed list2741int JoinArea(CvAStarNode* parent, CvAStarNode* node, int data, const void* pointer, CvAStar* finder)2742{2743	if(data == ASNL_ADDCLOSED)2744	{2745		GC.getMap().plotUnchecked(node->m_iX, node->m_iY)->setArea(finder->GetInfo());2746	}27472748	return 1;2749}

Calls

Called by