Changeset 10937
- Timestamp:
- Dec 7, 2015, 3:32:07 PM (9 years ago)
- Location:
- code/branches/explosionChunksHS15
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/explosionChunksHS15/data/levels/HeavyCruiser.oxw
r10837 r10937 552 552 All Pawns can easily be included into a level using the lua file "HeavyCruiserParts" --> 553 553 554 <Pawn team=1 health=100 initialhealth=100 maxhealth=100 position="0,300,-2000" yaw="180" direction="0,0,0" collisionType=dynamic mass=10000 name=HeavyCruiser_body radarname = "HeavyCruiser" >554 <Pawn team=1 health=1000 initialhealth=1000 maxhealth=1000 position="0,300,-2000" yaw="180" direction="0,0,0" collisionType=dynamic mass=10000 name=HeavyCruiser_body radarname = "HeavyCruiser" > 555 555 <explosion> 556 <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" size=20 /> 557 <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" size=20 /> 558 <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" size=20 /> 559 560 <ExplosionPart offset="50,50,50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" size=20 delay=0.3 /> 561 <ExplosionPart offset="50,50,50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" size=20 delay=0.3 /> 562 <ExplosionPart offset="50,50,50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" size=20 delay=0.3 /> 563 564 <ExplosionPart offset="100,100,100" minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" size=20 delay=0.6 /> 565 <ExplosionPart offset="100,100,100" minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" size=20 delay=0.6 /> 566 <ExplosionPart offset="100,100,100" minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" size=20 delay=0.6 /> 567 568 <ExplosionPart offset="150,150,150" minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" size=20 delay=0.9 /> 569 <ExplosionPart offset="150,150,150" minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" size=20 delay=0.9 /> 570 <ExplosionPart offset="150,150,150" minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" size=20 delay=0.9 /> 556 <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_sparks2" scale=2.5 /> 557 <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flame2" scale=2.5 /> 558 <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" scale=12 /> 559 <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" scale=2.5 /> 560 561 <ExplosionPart offset="50,50,50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_sparks2" scale=2.5 delay=0.3 /> 562 <ExplosionPart offset="50,50,50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_flame2" scale=2.5 delay=0.3 /> 563 <ExplosionPart offset="50,50,50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" scale=12 delay=0.3 /> 564 <ExplosionPart offset="50,50,50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" scale=2.5 delay=0.3 /> 565 566 <ExplosionPart offset="50,-50,-50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_sparks2" scale=2.5 delay=0.6 /> 567 <ExplosionPart offset="50,-50,-50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_flame2" scale=2.5 delay=0.6 /> 568 <ExplosionPart offset="50,-50,-50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" scale=12 delay=0.6 /> 569 <ExplosionPart offset="50,-50,-50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" scale=2.5 delay=0.6 /> 570 571 <ExplosionPart offset="-50,0,50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_sparks2" scale=2.5 delay=0.9 /> 572 <ExplosionPart offset="-50,0,50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_flame2" scale=2.5 delay=0.9 /> 573 <ExplosionPart offset="-50,0,50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" scale=12 delay=0.9 /> 574 <ExplosionPart offset="-50,0,50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" scale=2.5 delay=0.9 /> 571 575 </explosion> 572 576 <attached> -
code/branches/explosionChunksHS15/data/levels/templates/spaceshipAssff.oxt
r10837 r10937 61 61 <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" /> 62 62 63 <ExplosionPart mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" direction="0,1,0" angle=30/>64 <ExplosionPart mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" direction="0,1,0" angle=30/>65 <ExplosionPart mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" direction="0,1,0" angle=30/>66 <ExplosionPart mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" direction="0,1,0" angle=30/>63 <ExplosionPart mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" /> 64 <ExplosionPart mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" /> 65 <ExplosionPart mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" /> 66 <ExplosionPart mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" /> 67 67 </explosion> 68 68 <?lua -
code/branches/explosionChunksHS15/data/levels/templates/spaceshipPirate.oxt
r10837 r10937 55 55 <explosion> 56 56 <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" /> 57 <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />57 <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" scale=2 /> 58 58 <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" /> 59 59 -
code/branches/explosionChunksHS15/src/libraries/tools/ParticleInterface.cc
r10624 r10937 233 233 this->particleSystem_->setKeepParticlesInLocalSpace(keep); 234 234 } 235 236 void ParticleInterface::setDimensions(float scale) 237 { 238 this->particleSystem_->setDefaultDimensions(scale * this->particleSystem_->getDefaultWidth(), scale * this->particleSystem_->getDefaultHeight()); 239 } 235 240 } -
code/branches/explosionChunksHS15/src/libraries/tools/ParticleInterface.h
r10624 r10937 75 75 void setDetailLevel(unsigned int level); 76 76 77 void setDimensions(float scale); 78 77 79 protected: 78 80 virtual void changedTimeFactor(float factor_new, float factor_old); -
code/branches/explosionChunksHS15/src/modules/dodgerace/DodgeRace.cc
r10624 r10937 71 71 for (int i = 0; i < 7; i++) 72 72 { 73 BigExplosion* chunk = new BigExplosion(this->center_->getContext()); 74 chunk->setPosition(Vector3(600, 0, 100.f * i - 300)); 75 chunk->setVelocity(Vector3(1000, 0, 0)); //player->getVelocity() 76 chunk->setScale(20); 73 WeakPtr<ExplosionPart> chunk5 = new ExplosionPart(this->center_->getContext()); 74 chunk5->setPosition(Vector3(600, 0, 100.f * i - 300)); 75 chunk5->setVelocity(Vector3(1000, 0, 0)); //player->getVelocity() 76 chunk5->setScale(10); 77 chunk5->setEffect1("Orxonox/explosion2b"); 78 chunk5->setEffect2("Orxonox/smoke6"); 79 chunk5->Explode(); 80 77 81 } 78 82 } -
code/branches/explosionChunksHS15/src/modules/dodgerace/DodgeRace.h
r10624 r10937 56 56 57 57 #include "core/command/ConsoleCommand.h" 58 #include "worldentities/BigExplosion.h"59 58 60 59 #include "gametypes/Deathmatch.h" -
code/branches/explosionChunksHS15/src/modules/invader/Invader.cc
r10624 r10937 51 51 52 52 #include "core/command/ConsoleCommand.h" 53 #include "worldentities/ BigExplosion.h"53 #include "worldentities/ExplosionPart.h" 54 54 55 55 namespace orxonox … … 82 82 for (int i = 0; i < 7; i++) 83 83 { 84 BigExplosion* chunk = new BigExplosion(this->center_->getContext()); 85 chunk->setPosition(Vector3(600, 0, 100.f * i - 300)); 86 chunk->setVelocity(Vector3(1000, 0, 0)); //player->getVelocity() 87 chunk->setScale(20); 84 85 WeakPtr<ExplosionPart> chunk5 = new ExplosionPart(this->center_->getContext()); 86 chunk5->setPosition(this->center_->getPosition()); 87 chunk5->setVelocity(Vector3(1000, 0, 0)); //player->getVelocity() 88 chunk5->setScale(10); 89 chunk5->setEffect1("Orxonox/explosion2b"); 90 chunk5->setEffect2("Orxonox/smoke6"); 91 chunk5->setMinSpeed(0); 92 chunk5->setMaxSpeed(0); 93 chunk5->Explode(); 94 88 95 } 89 96 } -
code/branches/explosionChunksHS15/src/orxonox/OrxonoxPrereqs.h
r10624 r10937 175 175 176 176 // worldentities 177 class BigExplosion;178 177 class CameraPosition; 179 178 class ControllableEntity; -
code/branches/explosionChunksHS15/src/orxonox/items/ShipPart.cc
r10624 r10937 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/explosionChunksHS15/src/orxonox/worldentities/CMakeLists.txt
r10752 r10937 6 6 ControllableEntity.cc 7 7 Drone.cc 8 BigExplosion.cc9 8 EffectContainer.cc 10 9 ExplosionChunk.cc -
code/branches/explosionChunksHS15/src/orxonox/worldentities/ExplosionPart.cc
r10837 r10937 26 26 * 27 27 */ 28 28 29 29 30 … … 86 87 XMLPortParam(ExplosionPart, "direction", setDirection, getDirection, xmlelement, mode).defaultValues(Vector3(1,1,1)); 87 88 XMLPortParam(ExplosionPart, "angle", setAngle, getAngle, xmlelement, mode).defaultValues(180); 88 XMLPortParam(ExplosionPart, "size", setSize, getSize, xmlelement, mode).defaultValues(4);89 89 XMLPortParam(ExplosionPart, "delay", setDelay, getDelay, xmlelement, mode).defaultValues(0); 90 90 } … … 120 120 //this->model_->setSyncMode(0); 121 121 122 122 123 if(effect1_ != "") 123 124 { 124 125 this->effect1Particle_ = new ParticleInterface(this->getScene()->getSceneManager(), effect1_, this->LOD_); 126 this->effect1Particle_->setDimensions(this->getScale()); 125 127 this->model_->attachOgreObject(this->effect1Particle_->getParticleSystem()); 126 128 } … … 129 131 { 130 132 this->effect2Particle_ = new ParticleInterface(this->getScene()->getSceneManager(), effect2_, this->LOD_); 133 this->effect2Particle_->setDimensions(this->getScale()); 131 134 this->model_->attachOgreObject(this->effect2Particle_->getParticleSystem()); 132 135 } 136 137 133 138 134 139 … … 144 149 this->explosionEntity_->setVelocity(finalDirection*rnd(minSpeed_,maxSpeed_)); 145 150 this->explosionEntity_->setAngularVelocity(Vector3(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1)).normalisedCopy() * Degree(400).valueRadians()); 146 this->explosionEntity_->setScale(size_); 151 this->explosionEntity_->setScale(this->getScale() * 4); 152 147 153 148 154 this->explosionEntity_->attach(model_); 155 149 156 150 157 this->attach(explosionEntity_); … … 192 199 { 193 200 this->posOffset_ = newVector; 194 this->explosionEntity_->setPosition(this->getPosition() + this->posOffset_ );201 this->explosionEntity_->setPosition(this->getPosition() + this->posOffset_ / this->getScale()); 195 202 } 196 203 … … 203 210 { 204 211 this->angle_ = newAngle; 205 }206 207 void ExplosionPart::setSize(float newSize)208 {209 this->size_ = newSize;210 212 } 211 213 … … 249 251 } 250 252 251 float ExplosionPart::getSize()252 {253 return size_;254 }255 256 253 float ExplosionPart::getDelay() 257 254 { -
code/branches/explosionChunksHS15/src/orxonox/worldentities/ExplosionPart.h
r10837 r10937 72 72 void setAngle(float newAgnle); 73 73 float getAngle(); 74 void setSize(float newSize);75 float getSize();76 74 void setDelay(float newDelay); 77 75 float getDelay(); … … 97 95 Vector3 direction_; 98 96 float angle_; 99 float size_;100 97 float delay_; 101 98 -
code/branches/explosionChunksHS15/src/orxonox/worldentities/pawns/Pawn.cc
r10837 r10937 41 41 #include "graphics/ParticleSpawner.h" 42 42 #include "worldentities/ExplosionChunk.h" 43 #include "worldentities/BigExplosion.h"44 43 #include "worldentities/ExplosionPart.h" 45 44 #include "weaponsystem/WeaponSystem.h" … … 380 379 void Pawn::goWithStyle() 381 380 { 382 orxout() << "gowithstyle" << endl;383 384 381 385 382 this->bAlive_ = false;
Note: See TracChangeset
for help on using the changeset viewer.