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

Method SV_PointContents

server/src/main/java/jake2/server/SV_WORLD.java:347–367  ·  view source on GitHub ↗
(float[] p, GameImportsImpl gameImports)

Source from the content-addressed store, hash-verified

345 * ============= SV_PointContents =============
346 */
347 static int SV_PointContents(float[] p, GameImportsImpl gameImports) {
348 edict_t hit;
349 int i, num;
350 int contents, c2;
351 int headnode;
352 // get base contents from world
353 contents = gameImports.cm.PointContents(p, gameImports.sv.models[1].headnode);
354 // or in contents from all the other entities
355 num = SV_AreaEdicts(p, p, gameImports.world.touch, Defines.MAX_EDICTS, Defines.AREA_SOLID, gameImports);
356 for (i = 0; i < num; i++) {
357 hit = gameImports.world.touch[i];
358 // might intersect, so do an exact clip
359 headnode = SV_HullForEntity(hit, gameImports);
360 if (hit.solid != Defines.SOLID_BSP) {
361 }
362 c2 = gameImports.cm.TransformedPointContents(p, headnode, hit.s.origin,
363 hit.s.angles);
364 contents |= c2;
365 }
366 return contents;
367 }
368
369 /*
370 * ================ SV_HullForEntity

Callers 1

getPointContentsMethod · 0.95

Calls 4

SV_AreaEdictsMethod · 0.95
SV_HullForEntityMethod · 0.95
PointContentsMethod · 0.80

Tested by

no test coverage detected