| 1168 | } |
| 1169 | |
| 1170 | bool AIPathSetAsStaticPath(object *obj, void *goal_ptr, int path_id, int start_node, int end_node, int cur_node) { |
| 1171 | bool status; |
| 1172 | ai_frame *ai_info = obj->ai_info; |
| 1173 | ai_path_info *aip = &ai_info->path; |
| 1174 | |
| 1175 | #ifdef _DEBUG |
| 1176 | if (AI_debug_robot_do && OBJNUM(obj) == AI_debug_robot_index) { |
| 1177 | mprintf(0, "AI Note: In free path\n"); |
| 1178 | } |
| 1179 | #endif |
| 1180 | AIPathFreePath(aip); |
| 1181 | |
| 1182 | aip->goal_index = (goal *)goal_ptr - ai_info->goals; |
| 1183 | aip->goal_uid = ((goal *)goal_ptr)->goal_uid; |
| 1184 | |
| 1185 | status = AIPathAddStaticPath(aip, path_id, start_node, end_node); |
| 1186 | |
| 1187 | if (status) { |
| 1188 | aip->cur_node = cur_node; |
| 1189 | } |
| 1190 | |
| 1191 | return status; |
| 1192 | } |
| 1193 | |
| 1194 | #ifdef _DEBUG |
| 1195 |
no test coverage detected