| 723 | } |
| 724 | |
| 725 | void zNPCGoalAlertFodder::GetInArena(F32 dt) |
| 726 | { |
| 727 | zNPCRobot* npc; |
| 728 | xVec3 vec1; |
| 729 | xVec3 dir_want; |
| 730 | xVec3 dir; |
| 731 | |
| 732 | npc = (zNPCRobot*)this->psyche->clt_owner; |
| 733 | |
| 734 | xVec3Sub(&vec1, npc->arena.Pos(), npc->zNPCCommon::Pos()); |
| 735 | |
| 736 | F32 rot = xVec3Length(&vec1); |
| 737 | |
| 738 | if (rot < 1.0f) |
| 739 | { |
| 740 | xVec3Copy(&vec1, NPCC_rightDir(npc)); |
| 741 | } |
| 742 | else |
| 743 | { |
| 744 | xVec3SMulBy(&vec1, 1.0f / rot); |
| 745 | } |
| 746 | |
| 747 | xVec3Copy(&dir_want, &vec1); |
| 748 | |
| 749 | npc->ThrottleAdjust(dt, 6.0f, -1.0f); |
| 750 | rot = npc->TurnToFace(dt, &dir_want, -1.0f); |
| 751 | NPCC_ang_toXZDir(npc->frame->rot.angle + rot, &dir); |
| 752 | npc->ThrottleApply(dt, &dir, 0); |
| 753 | } |
| 754 | |
| 755 | S32 zNPCGoalAlertChomper::MoveEvadePos(const xVec3* pos, F32 dt) |
| 756 | { |
no test coverage detected