| 753 | } |
| 754 | |
| 755 | S32 zNPCGoalAlertChomper::MoveEvadePos(const xVec3* pos, F32 dt) |
| 756 | { |
| 757 | S32 arrived = 0; |
| 758 | zNPCRobot* npc = (zNPCRobot*)(psyche->clt_owner); |
| 759 | xVec3 dir_evade; |
| 760 | xVec3 dir; |
| 761 | F32 dst = npc->XZDstSqToPos(pos, &dir_evade, 0); |
| 762 | if (dst < SQ(1.0f)) |
| 763 | { |
| 764 | arrived = 1; |
| 765 | } |
| 766 | else |
| 767 | { |
| 768 | dir_evade /= xsqrt(dst); |
| 769 | npc->ThrottleAdjust(dt, 2.5f, -1.0f); |
| 770 | NPCC_ang_toXZDir(npc->frame->rot.angle + npc->TurnToFace(dt, &dir_evade, -1.0f), &dir); |
| 771 | npc->ThrottleApply(dt, &dir, 0); |
| 772 | } |
| 773 | return arrived; |
| 774 | } |
| 775 | |
| 776 | void zNPCGoalAlertFodder::MoveEvade(F32 dt) |
| 777 | { |
nothing calls this directly
no test coverage detected