MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / GetCurrentCampaign

Method GetCurrentCampaign

Source/Main/engine.cpp:6510–6526  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6508}
6509
6510ScriptableCampaign* Engine::GetCurrentCampaign() {
6511 if (current_engine_state_.type == kEngineCampaignState) {
6512 if (current_engine_state_.campaign.Valid()) {
6513 return current_engine_state_.campaign.GetPtr();
6514 }
6515 } else {
6516 for (auto& i : state_history) {
6517 if (i.type == kEngineCampaignState) {
6518 if (i.campaign.Valid()) {
6519 return i.campaign.GetPtr();
6520 }
6521 }
6522 }
6523 }
6524
6525 return NULL;
6526}
6527
6528std::string Engine::GetCurrentLevelID() {
6529 if (current_engine_state_.type == kEngineLevelState || current_engine_state_.type == kEngineEditorLevelState) {

Callers 5

StartMultiplayerMethod · 0.80
DrawImGuiFunction · 0.80
ASSendGlobalMessageFunction · 0.80
ASGetCurrCampaignIDFunction · 0.80

Calls 2

ValidMethod · 0.45
GetPtrMethod · 0.45

Tested by

no test coverage detected