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

Method ValidateCurrentGoal

editor/levelkeypad.cpp:164–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164bool levelkeypad::ValidateCurrentGoal() {
165 int num_goals = Level_goals.GetNumGoals();
166
167 if (num_goals > 0) {
168 if (m_current_goal < 0 || m_current_goal >= num_goals)
169 m_current_goal = 0;
170
171 return true;
172 } else {
173 m_current_goal = -1;
174 return false;
175 }
176}
177
178bool levelkeypad::ValidateCurrentItem() {
179 if (ValidateCurrentGoal()) {

Callers

nothing calls this directly

Calls 1

GetNumGoalsMethod · 0.80

Tested by

no test coverage detected