| 206 | } |
| 207 | |
| 208 | bool AIPathGetCurrentNodePos(ai_path_info *aip, vector *pos, int *room) { |
| 209 | int c_path = aip->cur_path; |
| 210 | int c_node = aip->cur_node; |
| 211 | |
| 212 | int p_type = aip->path_type[c_path]; |
| 213 | int p_index = aip->path_id[c_path]; |
| 214 | |
| 215 | if (p_type == AIP_DYNAMIC) { |
| 216 | // chrishack -- add asserts |
| 217 | |
| 218 | *pos = AIDynamicPath[p_index].pos[c_node]; |
| 219 | if (room) { |
| 220 | *room = AIDynamicPath[p_index].roomnum[c_node]; |
| 221 | } |
| 222 | |
| 223 | return true; |
| 224 | } else if (p_type == AIP_STATIC) { |
| 225 | // chrishack -- add asserts |
| 226 | |
| 227 | *pos = GamePaths[p_index].pathnodes[c_node].pos; |
| 228 | if (room) { |
| 229 | *room = GamePaths[p_index].pathnodes[c_node].roomnum; |
| 230 | } |
| 231 | |
| 232 | return true; |
| 233 | } |
| 234 | |
| 235 | return false; |
| 236 | } |
| 237 | |
| 238 | // Chrishack -- need to add static path flag stuff |
| 239 | static bool AIPathMoveToNextNode(ai_path_info *aip) { |
no outgoing calls
no test coverage detected