Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dleaf_t* CMapParser::TracePointInLeaf ( const Vector3& vPoint )
- {
- int node = 0;
- while ( node >= 0 )
- {
- dnode_t* pNode = &m_nodeList[node];
- dplane_t* pPlane = &m_planeList[pNode->planenum];
- if ( pPlane->normal.Dot ( vPoint ) <= pPlane->dist )
- {
- node = pNode->children[1];
- }
- else
- {
- node = pNode->children[0];
- }
- }
- return &m_leafList[-node - 1];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement