MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / AIPathMoveToNextNode

Function AIPathMoveToNextNode

Descent3/aipath.cpp:239–264  ·  view source on GitHub ↗

Chrishack -- need to add static path flag stuff

Source from the content-addressed store, hash-verified

237
238// Chrishack -- need to add static path flag stuff
239static bool AIPathMoveToNextNode(ai_path_info *aip) {
240 int c_path = aip->cur_path;
241 int c_node = aip->cur_node;
242
243 int p_type = aip->path_type[c_path];
244 int p_index = aip->path_id[c_path];
245
246 c_node++;
247
248 if (c_node <= aip->path_end_node[c_path]) {
249 aip->cur_node++;
250 return true;
251 }
252
253 c_path++;
254
255 // We must want to check the next path
256 if (c_path < aip->num_paths) {
257 aip->cur_path++;
258 aip->cur_node = aip->path_start_node[aip->cur_path];
259
260 return true;
261 }
262
263 return false;
264}
265
266bool AIPathAtStart(ai_path_info *aip) {
267 if (aip->cur_path == 0 && aip->cur_node == aip->path_start_node[0])

Callers 4

AIPathGetNextNodePosFunction · 0.85
AIPathGetPrevNodePosFunction · 0.85
MakeTestPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected