[11242] | 1 | /* |
---|
| 2 | * ORXONOX - the hottest 3D action shooter ever to exist |
---|
| 3 | * > www.orxonox.net < |
---|
| 4 | * |
---|
| 5 | * |
---|
| 6 | * License notice: |
---|
| 7 | * |
---|
| 8 | * This program is free software; you can redistribute it and/or |
---|
| 9 | * modify it under the terms of the GNU General Public License |
---|
| 10 | * as published by the Free Software Foundation; either version 2 |
---|
| 11 | * of the License, or (at your option) any later version. |
---|
| 12 | * |
---|
| 13 | * This program is distributed in the hope that it will be useful, |
---|
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 16 | * GNU General Public License for more details. |
---|
| 17 | * |
---|
| 18 | * You should have received a copy of the GNU General Public License |
---|
| 19 | * along with this program; if not, write to the Free Software |
---|
| 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
---|
| 21 | * |
---|
| 22 | * Author: |
---|
| 23 | * Marvin Haeberle & Julian Huwyler |
---|
| 24 | * Co-authors: |
---|
| 25 | * ... |
---|
| 26 | * |
---|
| 27 | */ |
---|
| 28 | |
---|
| 29 | #include "StoryMode.h" |
---|
| 30 | |
---|
| 31 | #include "items/Engine.h" |
---|
| 32 | #include "controllers/ArtificialController.h" |
---|
[11681] | 33 | #include "controllers/NewHumanController.h" |
---|
[11242] | 34 | |
---|
| 35 | #include "core/CoreIncludes.h" |
---|
| 36 | #include "core/command/ConsoleCommandIncludes.h" |
---|
| 37 | #include "infos/PlayerInfo.h" |
---|
| 38 | #include "network/Host.h" |
---|
| 39 | #include "worldentities/pawns/Pawn.h" |
---|
| 40 | #include "LevelManager.h" |
---|
| 41 | |
---|
| 42 | namespace orxonox |
---|
| 43 | { |
---|
| 44 | |
---|
[11269] | 45 | SetConsoleCommand("StoryMode", "exit", &StoryMode::exit); |
---|
[11242] | 46 | RegisterUnloadableClass(StoryMode); |
---|
| 47 | |
---|
| 48 | StoryMode::StoryMode(Context* context) : Gametype(context) |
---|
| 49 | { |
---|
| 50 | RegisterObject(StoryMode); |
---|
[11681] | 51 | orxout() << "kill yourself1"; |
---|
[11242] | 52 | |
---|
| 53 | this->gtinfo_ = new GametypeInfo(context); |
---|
| 54 | this->bAutoStart_ = true; |
---|
| 55 | this->bForceSpawn_ = true; |
---|
| 56 | } |
---|
| 57 | |
---|
| 58 | |
---|
[11255] | 59 | /* |
---|
| 60 | void StoryMode::start() |
---|
[11242] | 61 | { |
---|
| 62 | Gametype::start(); |
---|
| 63 | |
---|
[11681] | 64 | this->gtinfo_->sendAnnounceMessage("send nudes"); |
---|
[11242] | 65 | } |
---|
[11269] | 66 | */ |
---|
| 67 | void StoryMode::exit() |
---|
[11242] | 68 | { |
---|
[11269] | 69 | for (StoryMode* mission : ObjectList<StoryMode>()) |
---|
| 70 | { //TODO: make sure that only the desired mission is ended !! This is a dirty HACK, that would end ALL missions! |
---|
| 71 | mission->end(); |
---|
[11242] | 72 | } |
---|
[11269] | 73 | //Gametype::end(); |
---|
[11242] | 74 | } |
---|
[11681] | 75 | |
---|
[11269] | 76 | /* |
---|
[11242] | 77 | void Mission::setTeams() |
---|
| 78 | { //Set pawn-colours |
---|
| 79 | for (Pawn* pawn : ObjectList<Pawn>()) |
---|
| 80 | { |
---|
| 81 | if (!pawn) |
---|
| 82 | continue; |
---|
| 83 | this->setDefaultObjectColour(pawn); |
---|
| 84 | } |
---|
| 85 | } |
---|
| 86 | void Mission::endMission(bool accomplished) |
---|
| 87 | { |
---|
| 88 | for (Mission* mission : ObjectList<Mission>()) |
---|
| 89 | { //TODO: make sure that only the desired mission is ended !! This is a dirty HACK, that would end ALL missions! |
---|
| 90 | mission->setMissionAccomplished(accomplished); |
---|
| 91 | mission->end(); |
---|
| 92 | } |
---|
| 93 | } |
---|
| 94 | |
---|
| 95 | void Mission::setLivesWrapper(unsigned int amount) |
---|
| 96 | { |
---|
| 97 | for (Mission* mission : ObjectList<Mission>()) |
---|
| 98 | { //TODO: make sure that only the desired mission is ended !! This is a dirty HACK, that would affect ALL missions! |
---|
| 99 | mission->setLives(amount); |
---|
| 100 | } |
---|
| 101 | }*/ |
---|
| 102 | } |
---|