예제 #1
0
파일: maprules.cpp 프로젝트: Chuvi-w/CSSDK
void CGameCounter::Spawn(void)
{
	// Save off the initial count
	SetInitialValue(CountValue());
	CRulePointEntity::Spawn();
}
예제 #2
0
파일: kdtree.hpp 프로젝트: OpenTTD/OpenTTD
	/** Debugging function, counts number of occurrences of an element regardless of its correct position in the tree */
	size_t CountValue(const T &element, size_t node_idx) const
	{
		if (node_idx == INVALID_NODE) return 0;
		const node &n = this->nodes[node_idx];
		return CountValue(element, n.left) + CountValue(element, n.right) + ((n.element == element) ? 1 : 0);
	}
예제 #3
0
파일: maprules.cpp 프로젝트: Chuvi-w/CSSDK
	inline BOOL HitLimit(void) { return CountValue() == LimitValue(); }