MCPcopy Create free account
hub / github.com/demoth/jake2 / CM_TestInLeaf

Method CM_TestInLeaf

qcommon/src/main/java/jake2/qcommon/CM.java:1260–1285  ·  view source on GitHub ↗
(int leafnum)

Source from the content-addressed store, hash-verified

1258 * ================ CM_TestInLeaf ================
1259 */
1260 public void CM_TestInLeaf(int leafnum) {
1261 int k;
1262 int brushnum;
1263 cleaf_t leaf;
1264 cbrush_t b;
1265
1266 leaf = map_leafs[leafnum];
1267 if (0 == (leaf.contents & trace_contents))
1268 return;
1269 // trace line against all brushes in the leaf
1270 for (k = 0; k < leaf.numleafbrushes; k++) {
1271 brushnum = map_leafbrushes[leaf.firstleafbrush + k];
1272 b = map_brushes[brushnum];
1273 if (b.checkcount == checkcount)
1274 continue; // already checked this brush in another leaf
1275 b.checkcount = checkcount;
1276
1277 if (0 == (b.contents & trace_contents))
1278 continue;
1279 CM_TestBoxInBrush(trace_mins, trace_maxs, trace_start, trace_trace,
1280 b);
1281 if (0 == trace_trace.fraction)
1282 return;
1283 }
1284
1285 }
1286
1287 /*
1288 * ================== CM_RecursiveHullCheck ==================

Callers 1

BoxTraceMethod · 0.95

Calls 1

CM_TestBoxInBrushMethod · 0.95

Tested by

no test coverage detected