[11379] | 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: |
---|
[11416] | 23 | * Julien Kindle |
---|
[11379] | 24 | * Co-authors: |
---|
[11416] | 25 | * |
---|
[11379] | 26 | * |
---|
| 27 | */ |
---|
| 28 | |
---|
| 29 | /** |
---|
| 30 | @file SOBFigure.cc |
---|
| 31 | @brief This class represents your figure when you play the minigame. Here the movement of the figure, activating items, ... are handled. |
---|
| 32 | */ |
---|
| 33 | |
---|
| 34 | #include "SOBFigure.h" |
---|
| 35 | |
---|
| 36 | #include "core/CoreIncludes.h" |
---|
| 37 | #include "core/XMLPort.h" |
---|
| 38 | #include "graphics/Model.h" |
---|
[11383] | 39 | #include "graphics/Camera.h" |
---|
[11400] | 40 | #include "graphics/ParticleSpawner.h" |
---|
[11577] | 41 | #include <OgreMath.h> |
---|
[11379] | 42 | |
---|
[11402] | 43 | #include "SOBMushroom.h" |
---|
[11412] | 44 | #include "SOBGumba.h" |
---|
[11575] | 45 | #include "SOBFireball.h" |
---|
[11405] | 46 | #include "SOB.h" |
---|
[11412] | 47 | #include "SOBFlagstone.h" |
---|
[11416] | 48 | #include "SOBCastlestone.h" |
---|
[11573] | 49 | #include "SOBFireball.h" |
---|
[11418] | 50 | #include <BulletCollision/NarrowPhaseCollision/btManifoldPoint.h> |
---|
[11400] | 51 | |
---|
[11379] | 52 | namespace orxonox |
---|
| 53 | { |
---|
| 54 | RegisterClass(SOBFigure); |
---|
| 55 | |
---|
| 56 | SOBFigure::SOBFigure(Context* context) : ControllableEntity(context) |
---|
| 57 | { |
---|
| 58 | RegisterObject(SOBFigure); |
---|
| 59 | |
---|
| 60 | // initialize variables |
---|
[11416] | 61 | gravityAcceleration_ = 350.0; |
---|
[11383] | 62 | |
---|
[11416] | 63 | //Vars for movement of player |
---|
[11578] | 64 | moveUpPressed_ = false; |
---|
| 65 | moveDownPressed_ = false; |
---|
| 66 | moveLeftPressed_ = false; |
---|
| 67 | moveDownPressed_ = false; |
---|
| 68 | firePressed_ = false; |
---|
| 69 | collDisZ_ = 0; |
---|
[11517] | 70 | |
---|
[11416] | 71 | //Times and turning |
---|
[11578] | 72 | timeSinceLastFire_ = 0.0; |
---|
| 73 | lastSpeed_z = 0.0; |
---|
| 74 | pitch_ = 0.0; |
---|
| 75 | timeCounter_ = 0; |
---|
[11416] | 76 | |
---|
| 77 | //Properties of player |
---|
[11383] | 78 | |
---|
[11578] | 79 | isColliding_ = true; |
---|
| 80 | particlespawner_ = NULL; |
---|
| 81 | |
---|
[11416] | 82 | //Properties of players life |
---|
[11578] | 83 | predead_ = false; |
---|
| 84 | dead_ = false; |
---|
| 85 | lvlEnded_ = false; |
---|
[11416] | 86 | reachedLvlEndState_ = 0; |
---|
| 87 | |
---|
[11578] | 88 | // Properties concerning PowerUps and items |
---|
| 89 | PowerUpCounter_ = 0; |
---|
| 90 | maxPowerUp_ = 2; |
---|
| 91 | FireballPower = 2; |
---|
[11573] | 92 | //Properties of fireing Fireballs, NOTE! fireballs are fired with the moveUP Key, not with the fire key |
---|
[11578] | 93 | fireallowed_ = true; |
---|
| 94 | firecooldown_ = 0; |
---|
[11573] | 95 | |
---|
[11405] | 96 | |
---|
[11416] | 97 | setAngularFactor(0.0); //Means player doesn't turn on collision, so he doesn't fall over while walking over the ground |
---|
| 98 | this->enableCollisionCallback(); // Turns on that on every collision function collidesAgainst is executed |
---|
[11379] | 99 | } |
---|
| 100 | |
---|
[11400] | 101 | |
---|
| 102 | |
---|
| 103 | bool SOBFigure::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) { |
---|
| 104 | |
---|
[11418] | 105 | //Inform tick fct that player is colliding and tell him how far away the collision point is from player middle point in z dir |
---|
[11400] | 106 | isColliding_ = true; |
---|
[11418] | 107 | collDisZ_ = getPosition().z - contactPoint.getPositionWorldOnB().getZ(); |
---|
[11416] | 108 | |
---|
[11418] | 109 | |
---|
[11416] | 110 | //Orxocast returns object with casted type if otherObject has that class, and if not a nullptr |
---|
[11575] | 111 | SOBMushroom* mush = orxonox_cast<SOBMushroom*> (otherObject); |
---|
| 112 | SOBGumba* gumba = orxonox_cast<SOBGumba*> (otherObject); |
---|
| 113 | SOBFlagstone* flagstone = orxonox_cast<SOBFlagstone*> (otherObject); |
---|
| 114 | SOBCastlestone* castlestone = orxonox_cast<SOBCastlestone*> (otherObject); |
---|
| 115 | SOBFireball* fireball = orxonox_cast<SOBFireball*> (otherObject); |
---|
[11578] | 116 | SOB* SOBGame = orxonox_cast<SOB*> (getGametype()); |
---|
[11412] | 117 | |
---|
[11578] | 118 | |
---|
| 119 | //Check if otherObject is a powerup-mushroom |
---|
[11405] | 120 | if (mush != nullptr && !(mush->hasCollided_)) { |
---|
| 121 | otherObject->destroyLater(); |
---|
[11578] | 122 | |
---|
| 123 | PowerUpCounter_++; |
---|
| 124 | if(PowerUpCounter_ > maxPowerUp_) PowerUpCounter_ = maxPowerUp_; // you had already the max |
---|
| 125 | else this->changeClothes(); |
---|
| 126 | |
---|
[11416] | 127 | SOBGame->addMushroom(); // Tell the gametype to increase points |
---|
| 128 | mush->hasCollided_ = true; // needed because of destroyLater takes some time and player should receive points only once |
---|
[11538] | 129 | |
---|
[11578] | 130 | |
---|
[11491] | 131 | } |
---|
[11538] | 132 | |
---|
[11575] | 133 | |
---|
[11416] | 134 | //Check if otherObject is a Gumba (that walking enemies) |
---|
[11412] | 135 | |
---|
[11491] | 136 | else if (gumba != nullptr && !(gumba->hasCollided_)) { |
---|
| 137 | |
---|
[11556] | 138 | //If player jumps on its head, kill the Gumba, else, kill the player |
---|
[11412] | 139 | if (getVelocity().z >= -20) { |
---|
[11491] | 140 | // If player hasn't a power up, he dies. Else he shrinks and the gumba dies. |
---|
[11578] | 141 | if(PowerUpCounter_ == 0){ |
---|
[11575] | 142 | this->die(); |
---|
[11578] | 143 | } |
---|
| 144 | else{ |
---|
| 145 | PowerUpCounter_--; |
---|
| 146 | this->changeClothes(); |
---|
| 147 | |
---|
[11491] | 148 | gumba->destroyLater(); |
---|
| 149 | gumba->hasCollided_ = true; |
---|
| 150 | } |
---|
| 151 | |
---|
[11412] | 152 | } else { |
---|
| 153 | gumba->destroyLater(); |
---|
| 154 | gumba->hasCollided_ = true; |
---|
| 155 | SOBGame->addGumba(); |
---|
| 156 | |
---|
| 157 | |
---|
[11402] | 158 | } |
---|
[11400] | 159 | } |
---|
| 160 | |
---|
[11575] | 161 | else if (fireball != nullptr && !(fireball->hasCollided_)){ |
---|
[11597] | 162 | PowerUpCounter_--; |
---|
| 163 | this->changeClothes(); |
---|
[11575] | 164 | } |
---|
| 165 | |
---|
[11416] | 166 | //Purpose is that if player hits the flag, he should walk into the castle at the end of the level. For that we use SOBCastlestone |
---|
| 167 | if (reachedLvlEndState_ == 0 && flagstone != nullptr && !(flagstone->hasCollided_)) { |
---|
| 168 | flagstone->hasCollided_ = true; |
---|
| 169 | reachedLvlEndState_ = 1; |
---|
[11578] | 170 | |
---|
[11418] | 171 | SOBGame->setDone(true); |
---|
[11416] | 172 | SOBGame->addPoints(flagstone->getPoints()); |
---|
[11418] | 173 | |
---|
[11400] | 174 | |
---|
[11416] | 175 | } |
---|
| 176 | if (castlestone != nullptr && !(castlestone->hasCollided_)) { |
---|
| 177 | castlestone->hasCollided_ = true; |
---|
| 178 | reachedLvlEndState_++; |
---|
[11400] | 179 | |
---|
[11416] | 180 | } |
---|
| 181 | |
---|
[11412] | 182 | return true; |
---|
| 183 | } |
---|
[11383] | 184 | |
---|
[11379] | 185 | |
---|
[11416] | 186 | //Self implemented sign function that returns either 1 or -1 (and never 0) |
---|
[11412] | 187 | int SOBFigure::sgn(float x) { |
---|
| 188 | if (x < 0.0) return -1; |
---|
| 189 | return 1; |
---|
| 190 | } |
---|
| 191 | |
---|
[11573] | 192 | //Function to spawn the Fireball |
---|
| 193 | void SOBFigure::spawnFireball() { |
---|
| 194 | SOBCenterpoint* center_ = ((SOB*)getGametype())->center_; |
---|
| 195 | |
---|
| 196 | SOBFireball* ball = new SOBFireball(center_->getContext()); |
---|
| 197 | Vector3 spawnpos = this->getWorldPosition(); |
---|
| 198 | spawnpos.z += 0; |
---|
| 199 | |
---|
| 200 | if (ball != nullptr && center_ != nullptr) |
---|
| 201 | { |
---|
| 202 | ball->addTemplate("fireball"); |
---|
[11577] | 203 | bool direction = ((this->getWorldOrientation().getRoll().valueRadians())>-1.6&&(this->getWorldOrientation().getRoll().valueRadians()<1.6)); |
---|
| 204 | ball->setDirection(direction); |
---|
| 205 | orxout() << "Rotation: " << this->getWorldOrientation().getRoll() << " direction: "<< direction <<endl; |
---|
[11592] | 206 | if(direction) |
---|
| 207 | { |
---|
| 208 | spawnpos.x+=10; |
---|
| 209 | } |
---|
| 210 | else |
---|
| 211 | { |
---|
| 212 | spawnpos.x-=10; |
---|
| 213 | } |
---|
| 214 | ball->setPosition(spawnpos); |
---|
[11577] | 215 | |
---|
[11573] | 216 | } |
---|
| 217 | } |
---|
| 218 | |
---|
[11416] | 219 | //For those of you who don't have an idea: the tick function is called about 50 times/sec |
---|
[11412] | 220 | void SOBFigure::tick(float dt) |
---|
| 221 | { |
---|
| 222 | SUPER(SOBFigure, tick, dt); |
---|
| 223 | |
---|
[11416] | 224 | |
---|
| 225 | bool inputAllowed = true; |
---|
| 226 | |
---|
| 227 | //the particle spawner that generates the fire from the backpack when pressed |
---|
[11412] | 228 | if (particlespawner_ == NULL) { |
---|
| 229 | for (WorldEntity* object : this->getAttachedObjects()) |
---|
| 230 | { |
---|
[11416] | 231 | if (object->isA(Class(ParticleSpawner))) |
---|
[11412] | 232 | particlespawner_ = object; |
---|
[11416] | 233 | } |
---|
[11405] | 234 | } |
---|
[11400] | 235 | |
---|
| 236 | |
---|
[11416] | 237 | //Behavior on level end - this is like described above for the movement from the player when hit the flag. He moves then into the castle |
---|
| 238 | if (reachedLvlEndState_ != 0) { |
---|
| 239 | timeCounter_+= dt; |
---|
| 240 | inputAllowed = false; |
---|
| 241 | } |
---|
| 242 | if (reachedLvlEndState_ == 1 && timeCounter_ >= 1.5) { |
---|
| 243 | timeCounter_ = 0; |
---|
| 244 | reachedLvlEndState_ = 2; |
---|
| 245 | } |
---|
[11400] | 246 | |
---|
[11402] | 247 | |
---|
[11416] | 248 | //if input blocked, then cancel every movement operation |
---|
| 249 | if (!inputAllowed) { |
---|
[11578] | 250 | moveUpPressed_ = false; |
---|
| 251 | moveDownPressed_ = false; |
---|
| 252 | moveLeftPressed_ = false; |
---|
| 253 | moveRightPressed_ = false; |
---|
[11416] | 254 | } |
---|
[11400] | 255 | |
---|
[11416] | 256 | //set the gravityto standard 350 |
---|
| 257 | if (firePressed_ == false) { |
---|
| 258 | gravityAcceleration_ = 350.0; |
---|
[11400] | 259 | |
---|
[11416] | 260 | } |
---|
[11379] | 261 | |
---|
[11416] | 262 | if (hasLocalController()) |
---|
| 263 | { |
---|
[11578] | 264 | SOB* SOBGame = orxonox_cast<SOB*>(getGametype()); |
---|
[11416] | 265 | Vector3 velocity = getVelocity(); |
---|
| 266 | Vector3 position = getPosition(); |
---|
[11402] | 267 | |
---|
[11416] | 268 | if (!predead_) |
---|
| 269 | velocity.y = 0; |
---|
[11418] | 270 | //If player falls in a hole |
---|
[11416] | 271 | if (position.z < -100) { |
---|
| 272 | dead_ = true; |
---|
[11418] | 273 | SOBGame->setDone(true); |
---|
[11416] | 274 | } |
---|
[11402] | 275 | |
---|
[11381] | 276 | |
---|
[11416] | 277 | if (dead_) { |
---|
| 278 | velocity.x = 0; |
---|
| 279 | velocity.z = 0; |
---|
| 280 | setVelocity(velocity); |
---|
[11578] | 281 | |
---|
[11416] | 282 | if (firePressed_) |
---|
| 283 | SOBGame->restart(); |
---|
| 284 | return; |
---|
| 285 | } |
---|
[11379] | 286 | |
---|
| 287 | |
---|
[11416] | 288 | int maxvelocity_x = 100; |
---|
| 289 | int speedAddedPerTick = 5; |
---|
| 290 | int camMaxOffset = 25; |
---|
[11381] | 291 | |
---|
[11416] | 292 | timeSinceLastFire_ += dt; |
---|
| 293 | lastSpeed_z = velocity.z; |
---|
[11381] | 294 | |
---|
| 295 | |
---|
[11405] | 296 | |
---|
[11416] | 297 | //Handle the rocket fire from the jetpack |
---|
| 298 | if (velocity.z > 40) |
---|
| 299 | particlespawner_->setVisible(true); |
---|
| 300 | else |
---|
| 301 | particlespawner_->setVisible(false); |
---|
[11405] | 302 | |
---|
[11412] | 303 | |
---|
[11418] | 304 | //If player hits space and collides against an object under him then jump |
---|
[11517] | 305 | if (inputAllowed && firePressed_ && isColliding_ && (collDisZ_ >= 0 && collDisZ_ <+ 10)) { |
---|
[11416] | 306 | gravityAcceleration_ = 100.0; |
---|
[11418] | 307 | velocity.z = 110; |
---|
[11392] | 308 | } |
---|
[11381] | 309 | |
---|
[11392] | 310 | |
---|
[11420] | 311 | //Left-right movement with acceleration and rotation |
---|
[11400] | 312 | float rot = getOrientation().getRoll().valueDegrees(); |
---|
[11383] | 313 | if (moveRightPressed_) { |
---|
[11412] | 314 | if (!(rot < 5.0 && -5.0 < rot)) |
---|
| 315 | setOrientation(Vector3::UNIT_Z, getOrientation().getRoll() - sgn(rot)*dt*Radian(6)); |
---|
[11400] | 316 | |
---|
[11383] | 317 | if (std::abs(velocity.x) < maxvelocity_x) { |
---|
| 318 | velocity.x += speedAddedPerTick; |
---|
[11400] | 319 | |
---|
[11379] | 320 | } |
---|
[11383] | 321 | } else if (moveLeftPressed_) { |
---|
[11412] | 322 | if (!(abs(rot) > 175.0 )) |
---|
| 323 | setOrientation(Vector3::UNIT_Z, getOrientation().getRoll() + sgn(rot)*dt*Radian(6)); |
---|
[11400] | 324 | |
---|
[11412] | 325 | |
---|
| 326 | |
---|
[11383] | 327 | if (std::abs(velocity.x) < maxvelocity_x) { |
---|
| 328 | velocity.x -= speedAddedPerTick; |
---|
[11379] | 329 | } |
---|
[11383] | 330 | } else { |
---|
| 331 | velocity.x /= 1.1; |
---|
[11392] | 332 | } |
---|
[11379] | 333 | |
---|
[11573] | 334 | //If moveUp pressed, fire a fireball |
---|
[11578] | 335 | if(moveUpPressed_ && (PowerUpCounter_ >= FireballPower) && fireallowed_) |
---|
[11573] | 336 | { |
---|
| 337 | spawnFireball(); |
---|
[11578] | 338 | fireallowed_ = false; |
---|
| 339 | firecooldown_ = 0; |
---|
[11573] | 340 | } |
---|
[11392] | 341 | |
---|
[11573] | 342 | //Increase the firecooldown |
---|
[11578] | 343 | if(firecooldown_> 0.5) |
---|
[11573] | 344 | { |
---|
[11578] | 345 | fireallowed_ = true; |
---|
[11573] | 346 | } |
---|
| 347 | if(!fireallowed_) |
---|
| 348 | { |
---|
[11578] | 349 | firecooldown_ += dt; |
---|
[11573] | 350 | } |
---|
| 351 | |
---|
[11416] | 352 | //Again another EndOfLevel behavior |
---|
| 353 | if (reachedLvlEndState_ == 1) |
---|
| 354 | velocity.x = -2; |
---|
| 355 | if (reachedLvlEndState_ == 2) |
---|
| 356 | velocity.x = 30; |
---|
| 357 | if (reachedLvlEndState_ == 3) { |
---|
| 358 | velocity.x = 0; |
---|
| 359 | velocity.y = 20; |
---|
| 360 | } |
---|
| 361 | if (reachedLvlEndState_ == 4) { |
---|
| 362 | lvlEnded_ = true; |
---|
| 363 | dead_ = true; |
---|
| 364 | } |
---|
| 365 | |
---|
| 366 | //velocity = acc. * time |
---|
[11383] | 367 | velocity.z -= gravityAcceleration_*dt; |
---|
| 368 | setVelocity(velocity); |
---|
[11379] | 369 | |
---|
| 370 | |
---|
[11416] | 371 | //Camera operation - the camera should always follow the player in a specific region |
---|
[11383] | 372 | Camera* cam = getCamera(); |
---|
| 373 | Vector3 campos = cam->getPosition(); |
---|
[11379] | 374 | |
---|
[11383] | 375 | if (campos.x + camMaxOffset < position.x) { |
---|
| 376 | campos.x = position.x - camMaxOffset; |
---|
| 377 | cam->setPosition(campos); |
---|
[11379] | 378 | } |
---|
[11405] | 379 | if (campos.x - camMaxOffset > position.x) { |
---|
[11383] | 380 | campos.x = position.x + camMaxOffset; |
---|
| 381 | cam->setPosition(campos); |
---|
| 382 | } |
---|
[11379] | 383 | |
---|
[11383] | 384 | } |
---|
| 385 | |
---|
[11416] | 386 | // Reset key variables |
---|
[11578] | 387 | moveUpPressed_ = false; |
---|
| 388 | moveDownPressed_ = false; |
---|
| 389 | moveLeftPressed_ = false; |
---|
| 390 | moveRightPressed_ = false; |
---|
[11416] | 391 | |
---|
[11400] | 392 | isColliding_ = false; |
---|
[11418] | 393 | collDisZ_ = 0; |
---|
[11379] | 394 | |
---|
[11383] | 395 | } |
---|
[11379] | 396 | |
---|
| 397 | |
---|
[11383] | 398 | |
---|
| 399 | |
---|
| 400 | |
---|
[11416] | 401 | //The following functions read the input of the player and then set the bools for the movement |
---|
[11383] | 402 | void SOBFigure::moveFrontBack(const Vector2& value) |
---|
| 403 | { |
---|
| 404 | if (value.x > 0) |
---|
[11379] | 405 | { |
---|
[11383] | 406 | moveUpPressed_ = true; |
---|
| 407 | moveDownPressed_ = false; |
---|
[11379] | 408 | } |
---|
[11383] | 409 | else |
---|
| 410 | { |
---|
| 411 | moveUpPressed_ = false; |
---|
| 412 | moveDownPressed_ = true; |
---|
| 413 | } |
---|
| 414 | } |
---|
[11379] | 415 | |
---|
[11383] | 416 | void SOBFigure::moveRightLeft(const Vector2& value) |
---|
| 417 | { |
---|
| 418 | if (value.x > 0) |
---|
[11379] | 419 | { |
---|
[11383] | 420 | moveLeftPressed_ = false; |
---|
| 421 | moveRightPressed_ = true; |
---|
[11379] | 422 | } |
---|
[11383] | 423 | else |
---|
| 424 | { |
---|
| 425 | moveLeftPressed_ = true; |
---|
| 426 | moveRightPressed_ = false; |
---|
| 427 | } |
---|
| 428 | } |
---|
[11379] | 429 | |
---|
[11383] | 430 | void SOBFigure::boost(bool boost) |
---|
| 431 | { |
---|
[11400] | 432 | firePressed_ = boost; |
---|
[11379] | 433 | } |
---|
[11416] | 434 | |
---|
| 435 | |
---|
[11538] | 436 | |
---|
| 437 | // PRE: name is an existing name of a material. Example orxo_material for orxo_material.material in data_extern/materials |
---|
[11578] | 438 | // !!! PowerUpCounter_ has to be modified before changing the clothes!!! |
---|
[11538] | 439 | // POST: clothes of body of player are changed to name |
---|
[11578] | 440 | void SOBFigure::changeClothes(){ |
---|
| 441 | // clothes: white (basic), red (one PowerUp), orange (Fireball enabled) |
---|
| 442 | std::string clothes[] = {"orxo_material", "orxo_material_gross", "orxo_material_fire"}; |
---|
| 443 | |
---|
[11538] | 444 | std::set<WorldEntity*> attachedObjects = this->getAttachedObjects(); |
---|
| 445 | std::set<WorldEntity*>::iterator it; |
---|
| 446 | for (it = attachedObjects.begin(); it != attachedObjects.end(); ++it) |
---|
| 447 | { |
---|
| 448 | Model* FiguresModel = orxonox_cast<Model*>(*it); |
---|
| 449 | if (FiguresModel != nullptr) |
---|
| 450 | { |
---|
[11578] | 451 | FiguresModel->setSubMaterial(clothes[PowerUpCounter_] , 4); // 4 is the body |
---|
[11538] | 452 | } |
---|
| 453 | } |
---|
[11383] | 454 | } |
---|
[11578] | 455 | // PRE: |
---|
| 456 | // POST: Player jumps out of the game, game is finished and can be restarted. |
---|
[11575] | 457 | void SOBFigure::die(){ |
---|
| 458 | Vector3 vel = getVelocity(); |
---|
| 459 | vel.y = -80; |
---|
| 460 | vel.z = 200; |
---|
| 461 | setVelocity(vel); |
---|
[11578] | 462 | predead_= true; |
---|
[11575] | 463 | SOB* SOBGame = orxonox_cast<SOB*>(getGametype()); |
---|
| 464 | SOBGame->setDone(true); |
---|
| 465 | } |
---|
| 466 | |
---|
[11538] | 467 | } |
---|