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

Method get_mission_data

Descent3/pilot_class.cpp:961–980  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

959}
960
961void pilot::get_mission_data(int index, tMissionData *mdata) {
962 if (index < 0 || index >= num_missions_flown) {
963 mprintf(0, "Invalid mission index\n");
964 Int3();
965 return;
966 }
967
968 if (!mission_data) {
969 Int3();
970 mprintf(0, "No mission data\n");
971 return;
972 }
973
974 if (!mdata) {
975 Int3();
976 return;
977 }
978
979 memcpy(mdata, &mission_data[index], sizeof(tMissionData));
980}
981
982int pilot::find_mission_data(const char *mission_name) {
983 if (num_missions_flown <= 0) {

Calls

no outgoing calls

Tested by

no test coverage detected