| 794 | } |
| 795 | |
| 796 | void zNPCCommon::BUpdate(xVec3* pos) |
| 797 | { |
| 798 | NPCConfig* cfg = this->cfg_npc; |
| 799 | |
| 800 | if (cfg->useBoxBound) |
| 801 | { |
| 802 | this->bound.type = XBOUND_TYPE_BOX; |
| 803 | |
| 804 | xBBox* box = &this->bound.box; |
| 805 | xVec3 half = cfg->dim_bound * 0.5f; |
| 806 | |
| 807 | box->center = *pos + cfg->off_bound; |
| 808 | box->box.upper = box->center + half; |
| 809 | box->box.lower = box->center - half; |
| 810 | } |
| 811 | else |
| 812 | { |
| 813 | this->bound.type = XBOUND_TYPE_SPHERE; |
| 814 | |
| 815 | xSphere* sph = &this->bound.sph; |
| 816 | |
| 817 | sph->center = *pos + cfg->off_bound; |
| 818 | sph->r = cfg->dim_bound.x; |
| 819 | } |
| 820 | |
| 821 | if (this->bound.type != XBOUND_TYPE_NA) |
| 822 | { |
| 823 | xQuickCullForBound(&this->bound.qcd, &this->bound); |
| 824 | } |
| 825 | |
| 826 | zGridUpdateEnt(this); |
| 827 | } |
| 828 | |
| 829 | F32 zNPCCommon::BoundAsRadius(S32 useCfg) const |
| 830 | { |
nothing calls this directly
no test coverage detected