Changeset 10962 for code/branches/presentationHS15/src/orxonox
- Timestamp:
- Dec 9, 2015, 4:03:59 PM (9 years ago)
- Location:
- code/branches/presentationHS15
- Files:
-
- 2 deleted
- 7 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentationHS15
- Property svn:mergeinfo changed
/code/branches/explosionChunksHS15 (added) merged: 10641,10669,10752-10753,10755,10786,10807,10810,10837,10937,10939,10942
- Property svn:mergeinfo changed
-
code/branches/presentationHS15/src/orxonox/OrxonoxPrereqs.h
r10961 r10962 176 176 177 177 // worldentities 178 class BigExplosion;179 178 class CameraPosition; 180 179 class ControllableEntity; -
code/branches/presentationHS15/src/orxonox/items/ShipPart.cc
r10624 r10962 41 41 #include "worldentities/StaticEntity.h" 42 42 #include "items/PartDestructionEvent.h" 43 #include "worldentities/BigExplosion.h"44 43 #include "chat/ChatManager.h" 45 44 … … 105 104 void ShipPart::explode() 106 105 { 107 BigExplosion* chunk = new BigExplosion(this->getContext());108 chunk->setPosition(this->parent_->getPosition() + this->parent_->getOrientation() * (this->explosionPosition_));109 // chunk->setPosition(this->parent_->getPosition() + this->parent_->getOrientation() * Vector3(this->entityList_[0]->getLocalInertia()));110 chunk->setVelocity(this->parent_->getVelocity());106 // BigExplosion* chunk = new BigExplosion(this->getContext()); 107 // chunk->setPosition(this->parent_->getPosition() + this->parent_->getOrientation() * (this->explosionPosition_)); 108 // //chunk->setPosition(this->parent_->getPosition() + this->parent_->getOrientation() * Vector3(this->entityList_[0]->getLocalInertia())); 109 // chunk->setVelocity(this->parent_->getVelocity()); 111 110 112 111 // this->explosionSound_->setPosition(this->parent_->getPosition()); -
code/branches/presentationHS15/src/orxonox/worldentities/CMakeLists.txt
r8706 r10962 6 6 ControllableEntity.cc 7 7 Drone.cc 8 BigExplosion.cc9 8 EffectContainer.cc 10 9 ExplosionChunk.cc … … 12 11 SpawnPoint.cc 13 12 TeamSpawnPoint.cc 13 ExplosionPart.cc 14 14 ) 15 15 -
code/branches/presentationHS15/src/orxonox/worldentities/pawns/Pawn.cc
r10961 r10962 41 41 #include "graphics/ParticleSpawner.h" 42 42 #include "worldentities/ExplosionChunk.h" 43 #include "worldentities/ BigExplosion.h"43 #include "worldentities/ExplosionPart.h" 44 44 #include "weaponsystem/WeaponSystem.h" 45 45 #include "weaponsystem/WeaponSlot.h" … … 84 84 this->aimPosition_ = Vector3::ZERO; 85 85 86 //this->explosionPartList_ = NULL; 87 86 88 if (GameMode::isMaster()) 87 89 { … … 136 138 XMLPortParam(Pawn, "spawnparticlesource", setSpawnParticleSource, getSpawnParticleSource, xmlelement, mode); 137 139 XMLPortParam(Pawn, "spawnparticleduration", setSpawnParticleDuration, getSpawnParticleDuration, xmlelement, mode).defaultValues(3.0f); 138 XMLPortParam(Pawn, "explosionchunks", setExplosionChunks, getExplosionChunks, xmlelement, mode).defaultValues( 7);140 XMLPortParam(Pawn, "explosionchunks", setExplosionChunks, getExplosionChunks, xmlelement, mode).defaultValues(0); 139 141 140 142 XMLPortObject(Pawn, WeaponSlot, "weaponslots", addWeaponSlot, getWeaponSlot, xmlelement, mode); … … 145 147 XMLPortParam(Pawn, "shieldrechargerate", setShieldRechargeRate, getShieldRechargeRate, xmlelement, mode).defaultValues(0); 146 148 XMLPortParam(Pawn, "shieldrechargewaittime", setShieldRechargeWaitTime, getShieldRechargeWaitTime, xmlelement, mode).defaultValues(1.0f); 149 XMLPortObject(Pawn, ExplosionPart, "explosion", addExplosionPart, getExplosionPart, xmlelement, mode); 147 150 148 151 XMLPortParam(Pawn, "explosionSound", setExplosionSound, getExplosionSound, xmlelement, mode); … … 164 167 void Pawn::tick(float dt) 165 168 { 169 //BigExplosion* chunk = new BigExplosion(this->getContext()); 166 170 SUPER(Pawn, tick, dt); 167 171 … … 368 372 if (GameMode::isMaster()) 369 373 { 370 this->deatheffect();371 374 this->goWithStyle(); 372 375 } … … 375 378 void Pawn::goWithStyle() 376 379 { 380 377 381 this->bAlive_ = false; 378 382 this->setDestroyWhenPlayerLeft(false); 379 383 380 BigExplosion* chunk = new BigExplosion(this->getContext()); 381 chunk->setPosition(this->getPosition()); 382 chunk->setVelocity(this->getVelocity()); 384 while(!explosionPartList_.empty()) 385 { 386 explosionPartList_.back()->setPosition(this->getPosition()); 387 explosionPartList_.back()->setVelocity(this->getVelocity()); 388 explosionPartList_.back()->setOrientation(this->getOrientation()); 389 explosionPartList_.back()->Explode(); 390 explosionPartList_.pop_back(); 391 } 392 393 for (unsigned int i = 0; i < this->numexplosionchunks_; ++i) 394 { 395 ExplosionChunk* chunk = new ExplosionChunk(this->getContext()); 396 chunk->setPosition(this->getPosition()); 397 } 383 398 384 399 this->explosionSound_->setPosition(this->getPosition()); 385 400 this->explosionSound_->play(); 386 }387 void Pawn::deatheffect()388 {389 // play death effect390 /*{391 ParticleSpawner* effect = new ParticleSpawner(this->getContext());392 effect->setPosition(this->getPosition());393 effect->setOrientation(this->getOrientation());394 effect->setDestroyAfterLife(true);395 effect->setSource("Orxonox/explosion2b");396 effect->setLifetime(4.0f);397 }398 {399 ParticleSpawner* effect = new ParticleSpawner(this->getContext());400 effect->setPosition(this->getPosition());401 effect->setOrientation(this->getOrientation());402 effect->setDestroyAfterLife(true);403 effect->setSource("Orxonox/smoke6");404 effect->setLifetime(4.0f);405 }406 {407 ParticleSpawner* effect = new ParticleSpawner(this->getContext());408 effect->setPosition(this->getPosition());409 effect->setOrientation(this->getOrientation());410 effect->setDestroyAfterLife(true);411 effect->setSource("Orxonox/sparks");412 effect->setLifetime(4.0f);413 }*/414 415 416 {417 ParticleSpawner* effect = new ParticleSpawner(this->getContext());418 effect->setPosition(this->getPosition());419 effect->setOrientation(this->getOrientation());420 effect->setDestroyAfterLife(true);421 effect->setSource("orxonox/explosion_flash2");422 effect->setLifetime(5.0f);423 }424 {425 ParticleSpawner* effect = new ParticleSpawner(this->getContext());426 effect->setPosition(this->getPosition());427 effect->setOrientation(this->getOrientation());428 effect->setDestroyAfterLife(true);429 effect->setSource("orxonox/explosion_flame2");430 effect->setLifetime(5.0f);431 }432 {433 ParticleSpawner* effect = new ParticleSpawner(this->getContext());434 effect->setPosition(this->getPosition());435 effect->setOrientation(this->getOrientation());436 effect->setDestroyAfterLife(true);437 effect->setSource("orxonox/explosion_shockwave2");438 effect->scale(20);439 effect->setLifetime(5.0f);440 }{441 ParticleSpawner* effect = new ParticleSpawner(this->getContext());442 effect->setPosition(this->getPosition());443 effect->setOrientation(this->getOrientation());444 effect->setDestroyAfterLife(true);445 effect->setSource("orxonox/explosion_sparks2");446 effect->setLifetime(5.0f);447 }448 {449 ParticleSpawner* effect = new ParticleSpawner(this->getContext());450 effect->setPosition(this->getPosition());451 effect->setOrientation(this->getOrientation());452 effect->setDestroyAfterLife(true);453 effect->setSource("orxonox/explosion_streak2");454 effect->setLifetime(5.0f);455 }456 {457 ParticleSpawner* effect = new ParticleSpawner(this->getContext());458 effect->setPosition(this->getPosition());459 effect->setOrientation(this->getOrientation());460 effect->setDestroyAfterLife(true);461 effect->setSource("orxonox/explosion_afterglow");462 effect->scale(20);463 effect->setLifetime(5.0f);464 }465 466 467 for (unsigned int i = 0; i < this->numexplosionchunks_; ++i)468 {469 ExplosionChunk* chunk = new ExplosionChunk(this->getContext());470 chunk->setPosition(this->getPosition());471 }472 401 } 473 402 … … 476 405 Check whether the Pawn has a @ref Orxonox::WeaponSystem and fire it with the specified firemode if it has one. 477 406 */ 407 478 408 void Pawn::fired(unsigned int firemode) 479 409 { … … 488 418 this->spawneffect(); 489 419 } 420 421 422 void Pawn::addExplosionPart(ExplosionPart* ePart) 423 {this->explosionPartList_.push_back(ePart);} 424 425 426 ExplosionPart * Pawn::getExplosionPart() 427 {return this->explosionPartList_.back();} 428 429 490 430 491 431 /* WeaponSystem: -
code/branches/presentationHS15/src/orxonox/worldentities/pawns/Pawn.h
r10961 r10962 33 33 34 34 #include <string> 35 #include <vector> 35 36 #include "interfaces/PickupCarrier.h" 36 37 #include "interfaces/RadarViewable.h" 37 38 #include "worldentities/ControllableEntity.h" 39 #include "worldentities/ExplosionPart.h" 38 40 39 41 … … 142 144 virtual void fired(unsigned int firemode); 143 145 virtual void postSpawn(); 146 147 void addExplosionPart(ExplosionPart* ePart); 148 ExplosionPart * getExplosionPart(); 144 149 145 150 void addWeaponSlot(WeaponSlot * wSlot); … … 206 211 virtual Controller* getSlave(); 207 212 virtual void goWithStyle(); 208 virtual void deatheffect();209 213 virtual void spawneffect(); 210 214 … … 241 245 unsigned int numexplosionchunks_; 242 246 247 std::vector<ExplosionPart*> explosionPartList_; 248 243 249 private: 244 250 void registerVariables(); -
code/branches/presentationHS15/src/orxonox/worldentities/pawns/SpaceShip.cc
r10961 r10962 115 115 116 116 XMLPortObject(SpaceShip, Engine, "engines", addEngine, getEngine, xmlelement, mode); 117 118 117 119 } 118 120
Note: See TracChangeset
for help on using the changeset viewer.