| 1534 | } |
| 1535 | |
| 1536 | bool AIPathPlanner::GetPlanPosition(int index, Vector3& pos) const |
| 1537 | { |
| 1538 | int n = _planPoints.Size(); |
| 1539 | AI_ERROR(n == _plan.Size()); // _planPoints valid |
| 1540 | |
| 1541 | if (n <= 0) |
| 1542 | { |
| 1543 | pos = _destination; |
| 1544 | return true; |
| 1545 | } |
| 1546 | |
| 1547 | saturate(index, 0, n - 1); |
| 1548 | |
| 1549 | pos = _planPoints[index]; |
| 1550 | return index == n - 1; |
| 1551 | } |
| 1552 | |
| 1553 | FieldPassing::Mode AIPathPlanner::GetPlanMode(int index) const |
| 1554 | { |