| 619 | } |
| 620 | |
| 621 | S32 zNPCSpawner::IsSPLZClear(zMovePoint* sp) |
| 622 | { |
| 623 | xVec3 pos_sp; |
| 624 | S32 rc; |
| 625 | xBound bnd; |
| 626 | xVec3 delt; |
| 627 | |
| 628 | memset(&bnd, FALSE, sizeof(xBound)); |
| 629 | |
| 630 | bnd.type = 0; |
| 631 | xVec3Copy(&pos_sp, zMovePointGetPos(sp)); |
| 632 | |
| 633 | bnd.type = 1; |
| 634 | bnd.sph.r = 3.5f; |
| 635 | xVec3Copy(&bnd.box.center, &pos_sp); |
| 636 | |
| 637 | xQuickCullForBound(&bnd.qcd, &bnd); |
| 638 | |
| 639 | if (g_drawSpawnBounds) |
| 640 | { |
| 641 | xDrawSetColor(g_CYAN); |
| 642 | xBoundDraw(&bnd); |
| 643 | } |
| 644 | |
| 645 | if (NPCC_chk_hitPlyr(&bnd, NULL)) |
| 646 | { |
| 647 | return 0; |
| 648 | } |
| 649 | |
| 650 | xVec3Sub(&delt, xEntGetPos(&globals.player.ent), &pos_sp); |
| 651 | |
| 652 | if (SQ(delt.x) + SQ(delt.z) < SQ(3.5f)) |
| 653 | { |
| 654 | return 0; |
| 655 | } |
| 656 | |
| 657 | return IsNearbyMover(&bnd, TRUE, NULL); |
| 658 | } |
| 659 | |
| 660 | S32 zNPCSpawner::IsNearbyMover(xBound* bnd, S32 usecyl, xCollis* caller_colrec) |
| 661 | { |
nothing calls this directly
no test coverage detected