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

Function AIPathGetCurrentNodePos

Descent3/aipath.cpp:208–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208bool 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
239static bool AIPathMoveToNextNode(ai_path_info *aip) {

Callers 5

AIDoOrientFunction · 0.85
AIPathGetNextNodePosFunction · 0.85
AIPathGetPrevNodePosFunction · 0.85
MakeTestPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected