(float[] p, GameImportsImpl gameImports)
| 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 |
no test coverage detected