| 709 | return 0; |
| 710 | } |
| 711 | static S32 find_nearest_hook(const xVec3& loc) |
| 712 | { |
| 713 | S32 found = -1; |
| 714 | F32 closest = 10000000000.0f; |
| 715 | for (S32 i = 0; i < shared.hook_cache_size; ++i) |
| 716 | { |
| 717 | F32 attach_dist = shared.hook_cache[i]->asset->attach.dist; |
| 718 | xVec3* p = xEntGetPos(shared.hook_cache[i]->ent); |
| 719 | xVec3 dloc = *p + shared.hook_cache[i]->asset->center - loc; |
| 720 | F32 len2 = dloc.length2(); |
| 721 | if (len2 <= SQR(attach_dist) && len2 < closest) |
| 722 | { |
| 723 | found = i; |
| 724 | closest = len2; |
| 725 | } |
| 726 | } |
| 727 | return found; |
| 728 | } |
| 729 | static void init_sounds() |
| 730 | { |
| 731 | } |
no test coverage detected