Changeset 9949
- Timestamp:
- Jan 3, 2014, 3:14:19 PM (11 years ago)
- Location:
- code/trunk/src/orxonox/worldentities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/worldentities/BigExplosion.cc
r9946 r9949 78 78 } 79 79 80 BigExplosion::BigExplosion(Context* context, Vector3 initVelocity) : MobileEntity(context)81 {82 RegisterObject(BigExplosion);83 this->setVelocity(initVelocity);84 85 if ( GameMode::showsGraphics() && ( !this->getScene() || !this->getScene()->getSceneManager() ) )86 ThrowException(AbortLoading, "Can't create BigExplosion, no scene or no scene manager given.");87 88 this->bStop_ = false;89 this->LOD_ = LODParticle::Normal;90 91 if ( GameMode::showsGraphics() )92 {93 try94 {95 this->init();96 }97 catch (const std::exception& ex)98 {99 orxout(internal_error) << "Couldn't load particle effect in BigExplosion: " << ex.what() << endl;100 this->initZero();101 }102 }103 else104 {105 this->initZero();106 }107 108 if (GameMode::isMaster())109 {110 this->destroyTimer_.setTimer(rnd(2, 4), false, createExecutor(createFunctor(&BigExplosion::stop, this)));111 }112 113 this->registerVariables();114 }115 116 80 void BigExplosion::init() 117 81 { -
code/trunk/src/orxonox/worldentities/BigExplosion.h
r9939 r9949 41 41 public: 42 42 BigExplosion(Context* context); 43 BigExplosion(Context* context, Vector3 initVelocity);44 43 virtual ~BigExplosion(); 45 44 -
code/trunk/src/orxonox/worldentities/pawns/Pawn.cc
r9947 r9949 120 120 this->weaponSystem_->destroy(); 121 121 } 122 123 122 } 124 123 … … 151 150 XMLPortParam ( RadarViewable, "radarname", setRadarName, getRadarName, xmlelement, mode ); 152 151 } 153 154 152 155 153 void Pawn::registerVariables() … … 380 378 this->setDestroyWhenPlayerLeft(false); 381 379 382 BigExplosion* chunk = new BigExplosion(this->getContext() , this->getVelocity());380 BigExplosion* chunk = new BigExplosion(this->getContext()); 383 381 chunk->setPosition(this->getPosition()); 384 //chunk->setVelocity(this->getVelocity());382 chunk->setVelocity(this->getVelocity()); 385 383 386 384 this->explosionSound_->setPosition(this->getPosition());
Note: See TracChangeset
for help on using the changeset viewer.