Changeset 3087 for code/trunk
- Timestamp:
- May 27, 2009, 2:45:54 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 5 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/particles (added) merged: 2830,3054,3065
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/OrxonoxPrereqs.h
r3084 r3087 124 124 class Billboard; 125 125 class BlinkingBillboard; 126 class BigExplosion; 126 127 class ExplosionChunk; 127 128 class FadingBillboard; -
code/trunk/src/orxonox/objects/worldentities/BigExplosion.cc
- Property svn:eol-style set to native
r3086 r3087 36 36 #include <sstream> 37 37 38 #include "core/ Core.h"38 #include "core/GameMode.h" 39 39 #include "core/CoreIncludes.h" 40 40 #include "core/Executor.h" … … 53 53 RegisterObject(BigExplosion); 54 54 55 if ( Core::showsGraphics() && ( !this->getScene() || !this->getScene()->getSceneManager() ) )55 if ( GameMode::showsGraphics() && ( !this->getScene() || !this->getScene()->getSceneManager() ) ) 56 56 ThrowException(AbortLoading, "Can't create BigExplosion, no scene or no scene manager given."); 57 57 /* … … 70 70 */ 71 71 72 if ( Core::showsGraphics() )72 if ( GameMode::showsGraphics() ) 73 73 { 74 74 try … … 87 87 } 88 88 89 if ( Core::isMaster())89 if (GameMode::isMaster()) 90 90 { 91 91 Vector3 velocity(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1)); … … 94 94 this->setVelocity(velocity); 95 95 96 this->destroyTimer_.setTimer(rnd( 4, 7), false, this, createExecutor(createFunctor(&BigExplosion::stop)));96 this->destroyTimer_.setTimer(rnd(2, 4), false, this, createExecutor(createFunctor(&BigExplosion::stop))); 97 97 } 98 98 this->registerVariables(); … … 366 366 this->debrisSmoke4_->setEnabled(false); 367 367 368 if ( Core::isMaster())368 if (GameMode::isMaster()) 369 369 { 370 370 this->bStop_ = true; … … 395 395 396 396 397 /* if ( Core::isMaster() && rnd() < dt*(this->cps_))397 /* if (GameMode::isMaster() && rnd() < dt*(this->cps_)) 398 398 { 399 399 -
code/trunk/src/orxonox/objects/worldentities/BigExplosion.h
- Property svn:eol-style set to native
-
code/trunk/src/orxonox/objects/worldentities/CMakeLists.txt
r3077 r3087 10 10 Billboard.cc 11 11 BlinkingBillboard.cc 12 BigExplosion.cc 12 13 ExplosionChunk.cc 13 14 FadingBillboard.cc -
code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.cc
r3084 r3087 39 39 #include "objects/worldentities/ParticleSpawner.h" 40 40 #include "objects/worldentities/ExplosionChunk.h" 41 #include "objects/worldentities/BigExplosion.h" 41 42 42 43 #include "objects/weaponsystem/WeaponSystem.h" … … 143 144 144 145 if (GameMode::isMaster()) 145 if (this->health_ <= 0)146 this->death();146 if (this->health_ <= 0 && bAlive_) 147 this->death(); 147 148 } 148 149 … … 229 230 230 231 if (GameMode::isMaster()) 231 this->deatheffect(); 232 } 233 } 234 232 { 233 // this->deathEffect(); 234 this->goWithStyle(); 235 } 236 } 237 } 238 void Pawn::goWithStyle() 239 { 240 this->bAlive_ = false; 241 this->setDestroyWhenPlayerLeft(false); 242 243 BigExplosion* chunk = new BigExplosion(this->getCreator()); 244 chunk->setPosition(this->getPosition()); 245 246 } 235 247 void Pawn::deatheffect() 236 248 { -
code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.h
r3086 r3087 118 118 119 119 virtual void death(); 120 virtual void goWithStyle(); 120 121 virtual void deatheffect(); 121 122 virtual void spawneffect();
Note: See TracChangeset
for help on using the changeset viewer.