static void Delete(int xc, int yc) { Mission *mission = CampaignGetCurrentMission(&gCampaign); switch (yc) { case YC_CHARACTERS: DeleteCharacter(mission, xc); break; case YC_SPECIALS: DeleteSpecial(mission, xc); break; case YC_ITEMS: DeleteItem(mission, xc); break; default: if (yc >= YC_OBJECTIVES) { DeleteObjective(mission, yc - YC_OBJECTIVES); } else { DeleteMission(&gCampaign); } AdjustYC(&yc); break; } fileChanged = 1; Setup(0); }
CFLServer::~CFLServer() { DeleteMission(c_AllMissions); m_pcnxn->SetPrivateData(0); // disconnect two-way link between connection and this g_pLobbyApp->FreePerServerCounters(m_pCounters); // make sure all missions on this server are dead MissionList::Iterator iter(m_missions); while (!iter.End()) { delete iter.Value(); iter.Remove(); } // KGJV #114 FreeStaticCoreInfo(); }