| 71 | }; |
| 72 | |
| 73 | void GameModeManager_t::Tutorial_t::startTutorial(std::string mapToSet) |
| 74 | { |
| 75 | if ( mapToSet.compare("") == 0 ) |
| 76 | { |
| 77 | launchHub(); |
| 78 | } |
| 79 | else |
| 80 | { |
| 81 | if ( mapToSet.find(".lmp") == std::string::npos ) |
| 82 | { |
| 83 | mapToSet.append(".lmp"); |
| 84 | } |
| 85 | setTutorialMap(mapToSet); |
| 86 | } |
| 87 | #ifndef EDITOR |
| 88 | gameModeManager.setMode(gameModeManager.GameModes::GAME_MODE_TUTORIAL); |
| 89 | GameplayPreferences_t::reset(); |
| 90 | gameplayPreferences[0].process(); |
| 91 | #endif |
| 92 | stats[0]->clearStats(); |
| 93 | strcpy(stats[0]->name, "Player"); |
| 94 | stats[0]->sex = static_cast<sex_t>(local_rng.rand() % 2); |
| 95 | stats[0]->playerRace = RACE_HUMAN; |
| 96 | stats[0]->stat_appearance = local_rng.rand() % NUMAPPEARANCES; |
| 97 | client_classes[0] = CLASS_WARRIOR; |
| 98 | initClass(0); |
| 99 | } |
| 100 | |
| 101 | void GameModeManager_t::Tutorial_t::buttonReturnToTutorialHub(button_t* my) |
| 102 | { |
no test coverage detected