- Timestamp:
- Nov 2, 2015, 3:23:03 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/explosionChunksHS15/src/orxonox/worldentities/pawns/Pawn.cc
r10669 r10752 42 42 #include "worldentities/ExplosionChunk.h" 43 43 #include "worldentities/BigExplosion.h" 44 //#include "worldentities/VaydinExplosion.h"44 #include "worldentities/ExplosionPart.h" 45 45 #include "weaponsystem/WeaponSystem.h" 46 46 #include "weaponsystem/WeaponSlot.h" … … 86 86 this->aimPosition_ = Vector3::ZERO; 87 87 88 //this->explosionPartList_ = NULL; 89 88 90 if (GameMode::isMaster()) 89 91 { … … 144 146 XMLPortObject(Pawn, WeaponPack, "weapons", addWeaponPackXML, getWeaponPack, xmlelement, mode); 145 147 146 //XMLPortObject(Pawn, VaydinExplosion, "vaydinexplosion", addVaydinExplosion, getVaydinExplosion, xmlelement, mode);148 XMLPortObject(Pawn, ExplosionPart, "explosion", addExplosionPart, getExplosionPart, xmlelement, mode); 147 149 148 150 XMLPortParam(Pawn, "reloadrate", setReloadRate, getReloadRate, xmlelement, mode).defaultValues(0); … … 385 387 this->setDestroyWhenPlayerLeft(false); 386 388 387 BigExplosion* chunk = new BigExplosion(this->getContext());389 /*ExplosionPart* chunk = new ExplosionPart(this->getContext()); 388 390 chunk->setPosition(this->getPosition()); 389 391 chunk->setVelocity(this->getVelocity()); 392 chunk->Explode();*/ 393 394 while(!explosionPartList_.empty()) 395 { 396 explosionPartList_.back()->setPosition(this->getPosition()); 397 explosionPartList_.back()->setVelocity(this->getVelocity()); 398 explosionPartList_.back()->Explode(); 399 explosionPartList_.pop_back(); 400 } 390 401 391 402 this->explosionSound_->setPosition(this->getPosition()); … … 497 508 this->spawneffect(); 498 509 } 510 511 512 void Pawn::addExplosionPart(ExplosionPart* ePart) 513 {this->explosionPartList_.push_back(ePart);} 514 515 516 ExplosionPart * Pawn::getExplosionPart() 517 {return this->explosionPartList_.back();} 518 519 499 520 500 521 /* WeaponSystem:
Note: See TracChangeset
for help on using the changeset viewer.