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

Function PilotGetHighestLevelAchieved

Descent3/pilot.cpp:1595–1608  ·  view source on GitHub ↗

gets highest level flown for mission

Source from the content-addressed store, hash-verified

1593
1594// gets highest level flown for mission
1595int PilotGetHighestLevelAchieved(pilot *Pilot, char *mission_name) {
1596 ASSERT(Pilot);
1597 if (!Pilot)
1598 return 1;
1599
1600 int index = Pilot->find_mission_data(mission_name);
1601 if (index == -1)
1602 return 0;
1603
1604 tMissionData data;
1605 Pilot->get_mission_data(index, &data);
1606
1607 return data.highest_level;
1608}
1609
1610// just like it says
1611bool HasPilotFinishedMission(pilot *Pilot, const char *mission_name) {

Callers 1

menu.cppFile · 0.85

Calls 2

find_mission_dataMethod · 0.80
get_mission_dataMethod · 0.80

Tested by

no test coverage detected