Changeset 10053 for code/branches/modularships/src/orxonox/worldentities
- Timestamp:
- May 13, 2014, 11:45:47 AM (11 years ago)
- Location:
- code/branches/modularships/src/orxonox/worldentities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/modularships/src/orxonox/worldentities/WorldEntity.cc
r10052 r10053 119 119 WorldEntity::~WorldEntity() 120 120 { 121 orxout() << "destroying " << this->getIdentifier()->getName() << endl;122 121 if (this->isInitialized()) 123 122 { … … 581 580 { 582 581 // Note: The collision shapes may not be detached with this function! 583 orxout() << "WE: detachCS()" << endl;584 582 this->collisionShape_->detach(shape); 585 583 // Note: this->collisionShape_ already notifies us of any changes. -
code/branches/modularships/src/orxonox/worldentities/pawns/ModularSpaceShip.cc
r10052 r10053 133 133 this->entityPtrList_.push_back(one); 134 134 135 this->createCSPtrList(this->getWorldEntityCollisionShape());135 //this->createCSPtrList(this->getWorldEntityCollisionShape()); 136 136 137 137 orxout() << "New entity-part assignment created!" << endl; … … 139 139 140 140 // This should add smartPointers to all (Orxonox)Collisionshapes of this SpaceShip, preventing them fromg etting deleted. Might not work due to weird acting getAttachedShape 141 void ModularSpaceShip::createCSPtrList(CompoundCollisionShape* cs) 141 void ModularSpaceShip::createCSPtrList(CompoundCollisionShape* cs) // FIXME: (noep) remove debug 142 142 { 143 143 for (int i=0; i < cs->getNumChildShapes(); i++) … … 208 208 //orxout() << "ShipPart of Entity " << cs->getUserPointer() << ": " << this->getPartOfEntity((StaticEntity*)(cs->getUserPointer())) << endl; 209 209 210 orxout() << "CP before handleHit" << endl;211 212 210 if (this->getPartOfEntity((StaticEntity*)(cs->getUserPointer())) != NULL) 213 211 this->getPartOfEntity((StaticEntity*)(cs->getUserPointer()))->handleHit(damage, healthdamage, shielddamage, originator); … … 255 253 this->partList_.push_back(part); 256 254 part->setParent(this); 257 //part->addToSpaceShip(this); //FIXME: (noep) add258 255 this->updatePartAssignment(); 259 256 } … … 267 264 ShipPart* ModularSpaceShip::getShipPart(unsigned int index) 268 265 { 269 if(this->partList_.size() >= index)266 if(this->partList_.size() <= index) 270 267 return NULL; 271 268 else … … 339 336 this->printBtChildShapes((btCompoundShape*)(this->getWorldEntityCollisionShape()->getCollisionShape()), 2, 0); 340 337 this->detachCollisionShape(object->collisionShape_); // after succeeding, causes a crash in the collision handling 341 this->printBtChildShapes((btCompoundShape*)(this->getWorldEntityCollisionShape()->getCollisionShape()), 2, 0);338 //this->printBtChildShapes((btCompoundShape*)(this->getWorldEntityCollisionShape()->getCollisionShape()), 2, 0); 342 339 343 340 // mass
Note: See TracChangeset
for help on using the changeset viewer.