| 1070 | // Talk waypoint |
| 1071 | |
| 1072 | static bool GetTalkTarget(AIGroupContext* context, Vector3& pos) |
| 1073 | { |
| 1074 | STATE_PREFIX |
| 1075 | |
| 1076 | int& id = context->_fsm->Var(3); |
| 1077 | |
| 1078 | if (id >= 0 && id < vehiclesMap.Size()) |
| 1079 | { |
| 1080 | EntityAI* veh = vehiclesMap[id]; |
| 1081 | if (!veh) |
| 1082 | { |
| 1083 | return false; |
| 1084 | } |
| 1085 | const Target* target = group->FindTarget(veh); |
| 1086 | if (target) |
| 1087 | { |
| 1088 | pos = target->position; |
| 1089 | return true; |
| 1090 | } |
| 1091 | const AITargetInfo* info = group->GetCenter()->FindTargetInfo(veh); |
| 1092 | if (info) |
| 1093 | { |
| 1094 | pos = info->_realPos; |
| 1095 | return true; |
| 1096 | } |
| 1097 | } |
| 1098 | return false; |
| 1099 | } |
| 1100 | |
| 1101 | static void ArcadeTalkMove(AIGroupContext* context) |
| 1102 | { |
no test coverage detected