MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / Clear

Method Clear

Source/Campaign.cpp:239–254  ·  view source on GitHub ↗

* Clear all missions/map names, goals and aggression rates */

Source from the content-addressed store, hash-verified

237 * Clear all missions/map names, goals and aggression rates
238 */
239void cCampaign::Clear(const std::string& pName, const bool pDirectPath) {
240 mIsCustomMap = false;
241 mUseCustomPath = pDirectPath;
242 mIsRandom = false;
243 mIsCustomCampaign = false;
244 mName = pName;
245 mAuthor = "";
246 mPath = pName;
247
248 if (mUseCustomPath) {
249 auto Final = pName.find_last_of("/");
250 mName = pName.substr(0, Final);
251 }
252
253 mMissions.clear();
254}
255
256std::shared_ptr<cMap> cCampaign::getCMap(std::shared_ptr<cPhase> pPhase) const {
257

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected