Bazaar developer reference

CvAStar::Push(CvAStarNode *)

Defined in
CvAStar.cpp, line 727
Class
CvAStar
Hook name
CivHooks::CvAStar_Push

Hooks

static bool BeforeCvAStar_Push(CvAStar* self, CvAStarNode* node);static void AfterCvAStar_Push(CvAStar* self, CvAStarNode* node);static void ReplaceCvAStar_Push(void (*original)(CvAStar*, CvAStarNode*), CvAStar* self, CvAStarNode* node);CivRegisterBefore<CivHooks::CvAStar_Push>(host, &BeforeCvAStar_Push);CivRegisterAfter<CivHooks::CvAStar_Push>(host, &AfterCvAStar_Push);CivRegisterReplace<CivHooks::CvAStar_Push>(host, &ReplaceCvAStar_Push);

Code

726/// Push a node on the stack727void CvAStar::Push(CvAStarNode* node)728{729	if(node->m_bOnStack)730	{731		return;732	}733734	if(m_pStackHead == NULL)735	{736		m_pStackHead = &(m_ppaaNodes[node->m_iX][node->m_iY]);737	}738	else739	{740		FAssert(node->m_pStack == NULL);741		node->m_pStack = m_pStackHead;742		m_pStackHead = node;743	}744745	node->m_bOnStack = true;746}

Called by