Changeset 6874 in orxonox.OLD for trunk/src/story_entities/campaign.cc
- Timestamp:
- Jan 30, 2006, 11:03:30 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/story_entities/campaign.cc
r6862 r6874 40 40 assert( root != NULL); 41 41 42 this->bReturnToMenu = false; 43 42 44 this->campaignData = new CampaignData(root); 43 45 this->loadParams(root); … … 77 79 78 80 this->isRunning = true; 81 this->bReturnToMenu = false; 79 82 this->run(); 80 83 } … … 106 109 { 107 110 PRINTF(4)("Stopping the current Campaign\n"); 108 //this->isRunning = false;111 this->bReturnToMenu = true; 109 112 if( this->currentEntity != NULL) 110 113 { 111 this->currentEntity->setNextStoryID(0);112 114 this->currentEntity->stop(); 113 115 } … … 129 131 PRINTF(0)("Campaign is starting StoryEntity nr:%i\n", this->currentEntity->getStoryID()); 130 132 133 // check if return to menu 134 if( this->bReturnToMenu) 135 { 136 this->currentEntity = this->campaignData->getLevel(WORLD_ID_MENU); 137 this->bReturnToMenu = false; 138 } 139 140 this->campaignData->setCurrentEntity(this->currentEntity); 141 131 142 this->currentEntity->init(); 132 133 143 this->currentEntity->loadData(); 134 144 this->currentEntity->start(); 135 145 this->currentEntity->unloadData(); 136 146 } 137 PRINTF(2)("There is no StoryEnity left to play, returning to Main Menu\n");147 PRINTF(2)("There is no StoryEnity left to play, quitting game\n"); 138 148 } 139 149
Note: See TracChangeset
for help on using the changeset viewer.