Changeset 11322 for code/branches/SpaceRace_HS16/src/modules
- Timestamp:
- Dec 5, 2016, 4:15:27 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/SpaceRace_HS16/src/modules/gametypes/SpaceRace.cc
r11312 r11322 52 52 #include "SpaceRaceBot.h" 53 53 #include "items/Engine.h" 54 #include <vector> 55 54 56 55 57 namespace orxonox … … 78 80 void SpaceRace::start() 79 81 { 82 83 84 std::vector<int> spawnpositions; 85 86 spawnpositions.push_back(200); 87 spawnpositions.push_back(0); 88 spawnpositions.push_back(100); 89 90 spawnpositions.push_back(200); 91 spawnpositions.push_back(200); 92 spawnpositions.push_back(0); 93 94 spawnpositions.push_back(200); 95 spawnpositions.push_back(0); 96 spawnpositions.push_back(0); 97 98 spawnpositions.push_back(100); 99 spawnpositions.push_back(0); 100 spawnpositions.push_back(0); 101 102 spawnpositions.push_back(0); 103 spawnpositions.push_back(100); 104 spawnpositions.push_back(0); 105 106 80 107 Gametype::start(); 81 108 if (true) … … 89 116 90 117 } 91 92 } 93 94 95 118 119 int a,b,c; 120 a=0; 121 b=1; 122 c=2; 123 for (SpaceRaceBot* bot : ObjectList<SpaceRaceBot>()){ 124 bot->getControllableEntity()->setPosition(spawnpositions.at(a),spawnpositions.at(b),spawnpositions.at(c)); 125 a= a+3; 126 b = b+3; 127 c+= 3; 128 } 129 130 131 } 132 133 134 96 135 std::string message("BE FAST BE FIRST"); 97 136 this->getGametypeInfo()->sendAnnounceMessage(message); … … 137 176 138 177 139 /*// spawns the players when the countdown starts, but deactivates their engines140 if (this->isStartCountdownRunning() && !this->cantMove_)178 // spawns the players when the countdown starts, but deactivates their engines 179 /* if (this->isStartCountdownRunning() && !this->cantMove_) 141 180 { 142 181 this->spawnPlayersIfRequested(); … … 145 184 for (Engine* engine : ObjectList<Engine>()) 146 185 engine->setActive(false); 147 } 148 149 150 gtinfo_->setStartCountdown(50.0);186 }*/ 187 188 189 //gtinfo_->setStartCountdown(50.0); 151 190 152 191 … … 159 198 160 199 // activate the engines when the countdown ends 161 if (!this->isStartCountdownRunning() && this->cantMove_)200 /* if (!this->isStartCountdownRunning() && this->cantMove_) 162 201 { 163 202 for (Engine* engine : ObjectList<Engine>()) … … 218 257 void SpaceRace::addBots(unsigned int amount) 219 258 { 220 for (unsigned int i = 1; i <= amount /2; ++i){259 for (unsigned int i = 1; i <= amount; ++i){ 221 260 this->botclass_.fabricate(this->getContext()); 222 261 //SpaceRaceBot* bot = new SpaceRaceBot(this->getContext()); 223 262 //bot->setPosition(-i*150,0,-i*100); 224 263 } 225 for (unsigned int i = 1; i <= amount/2; ++i){ 226 this->botclass_.fabricate(this->getContext()); 227 //SpaceRaceBot* bot = new SpaceRaceBot(this->getContext()); 228 //bot->setPosition(-i*150,0,i*100); 229 } 264 230 265 231 266
Note: See TracChangeset
for help on using the changeset viewer.