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

Function SafeGoalClearAll

scripts/AIGame3.cpp:145–153  ·  view source on GitHub ↗

Wipes out all goals except slots 0 and 3 (used by Dallas)

Source from the content-addressed store, hash-verified

143
144// Wipes out all goals except slots 0 and 3 (used by Dallas)
145void SafeGoalClearAll(int obj_handle) {
146 int i;
147
148 for (i = 0; i < MAX_GOALS; i++) {
149 if (i != DALLAS_LOW_PRIORITY_GOAL_SLOT && i != DALLAS_HIGH_PRIORITY_GOAL_SLOT) {
150 AI_ClearGoal(obj_handle, i);
151 }
152 }
153}
154
155// Works like AI_SetType(), but won't clear out Dallas' goal slots 0 or 3
156void AI_SafeSetType(int obj_handle, int ai_type) {

Callers 1

AI_SafeSetTypeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected