/* * ORXONOX - the hottest 3D action shooter ever to exist * > www.orxonox.net < * * * License notice: * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * Author: * Marvin Haeberle & Julian Huwyler * Co-authors: * ... * */ #include "StoryMode.h" #include "items/Engine.h" #include "controllers/ArtificialController.h" #include "core/CoreIncludes.h" #include "core/command/ConsoleCommandIncludes.h" #include "infos/PlayerInfo.h" #include "network/Host.h" #include "worldentities/pawns/Pawn.h" #include "LevelManager.h" namespace orxonox { SetConsoleCommand("StoryMode", "exit", &StoryMode::exit); RegisterUnloadableClass(StoryMode); StoryMode::StoryMode(Context* context) : Gametype(context) { RegisterObject(StoryMode); this->gtinfo_ = new GametypeInfo(context); this->bAutoStart_ = true; this->bForceSpawn_ = true; } /* void StoryMode::start() { Gametype::start(); this->gtinfo_->sendAnnounceMessage("Marvin isch Chef"); } */ void StoryMode::exit() { orxout() << "s funktioniert"<< endl; for (StoryMode* mission : ObjectList()) { //TODO: make sure that only the desired mission is ended !! This is a dirty HACK, that would end ALL missions! mission->end(); } //Gametype::end(); } /* void Mission::setTeams() { //Set pawn-colours for (Pawn* pawn : ObjectList()) { if (!pawn) continue; this->setDefaultObjectColour(pawn); } } void Mission::endMission(bool accomplished) { for (Mission* mission : ObjectList()) { //TODO: make sure that only the desired mission is ended !! This is a dirty HACK, that would end ALL missions! mission->setMissionAccomplished(accomplished); mission->end(); } } void Mission::setLivesWrapper(unsigned int amount) { for (Mission* mission : ObjectList()) { //TODO: make sure that only the desired mission is ended !! This is a dirty HACK, that would affect ALL missions! mission->setLives(amount); } }*/ }