| 288 | } |
| 289 | |
| 290 | static bool AIPathMoveToPrevNode(ai_path_info *aip) { |
| 291 | int c_path = aip->cur_path; |
| 292 | int c_node = aip->cur_node; |
| 293 | |
| 294 | c_node--; |
| 295 | |
| 296 | if (c_node >= 0) { |
| 297 | aip->cur_node--; |
| 298 | return true; |
| 299 | } |
| 300 | |
| 301 | c_path--; |
| 302 | |
| 303 | // We must want to check the next path |
| 304 | if (c_path > 0) { |
| 305 | aip->cur_path--; |
| 306 | |
| 307 | if (aip->path_type[c_path] == AIP_DYNAMIC) { |
| 308 | aip->cur_node = AIDynamicPath[aip->path_id[c_path]].num_nodes - 1; |
| 309 | } else if (aip->path_type[c_path] == AIP_STATIC) { |
| 310 | aip->cur_node = aip->path_end_node[c_path]; |
| 311 | } |
| 312 | return true; |
| 313 | } |
| 314 | |
| 315 | return false; |
| 316 | } |
| 317 | |
| 318 | bool AIPathGetNextNodePos(ai_path_info *aip, vector *pos, int *room) { |
| 319 | if (AIPathMoveToNextNode(aip)) { |
no outgoing calls
no test coverage detected