2 GLOBAL _Mod_PointInLeaf
3 GLOBAL _SV_HullPointContents
9 mov eax, dword [esp+12-4] ; model
15 ; node = model->nodes;
17 mov esi, dword [eax+200] ; model->nodes
19 ; if (node->contents < 0)
21 cmp dword [esi], 0 ; node->contents
24 ; return (mleaf_t *)node;
32 mov edx, dword [esp+8+8] ; p
38 mov eax, dword [esi+76] ; node->plane
39 mov cl, byte [eax+16] ; node->plane->type
42 ; node = node->children[(node->plane->type < 3 ? p[node->plane->type] : DotProduct (p,node->plane->normal)) < node->plane->dist];
46 fld dword [eax+4] ; node->plane->normal[1]
47 fmul dword [edx+4] ; p[1]
48 fld dword [eax+8] ; node->plane->normal[2]
49 fmul dword [edx+8] ; p[2]
50 fld dword [eax] ; node->plane->normal[0]
51 fmul dword [edx] ; p[0]
54 fld dword [eax+12] ; node->plane->dist
57 test ah, 65 ; 00000041H
59 mov esi, dword [esi+ecx*4+80] ; node = node->children[condition]
61 ; if (node->contents < 0)
66 ; return (mleaf_t *)node;
71 ; return NULL; // never reached
83 test ah, 65 ; 00000041H
85 mov esi, dword [esi+ecx*4+80] ; node = node->children[condition]
87 ; if (node->contents < 0)
92 ; return (mleaf_t *)node;
97 ; return NULL; // never reached
106 _SV_HullPointContents
109 mov ecx, [esp+12-4] ; num
131 mov eax, [esp+8+16] ; hull
132 mov edx, [esp+16+16] ; p
139 mov al, [edi+ebx*8+16]
142 ; num = hull->clipnodes[num].children[(hull->planes[hull->clipnodes[num].planenum].type < 3 ? p[hull->planes[hull->clipnodes[num].planenum].type] : DotProduct (hull->planes[hull->clipnodes[num].planenum].normal, p)) < hull->planes[hull->clipnodes[num].planenum].dist];
154 fstp dword [esp-4+20]
157 fcomp dword [esp-4+20]
160 test ah, 65 ; 00000041H
163 movsx ecx, word [esi+eax*2+4]
181 fcomp dword [esp-4+20]
184 test ah, 65 ; 00000041H
187 movsx ecx, word [esi+eax*2+4]