Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 13, 2014, 11:45:47 AM (10 years ago)
Author:
noep
Message:

Fixed yet another segfault (which we hadn't seen yet).
Cleared emptyLevel, created two testlevels (testing with boxes)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/modularships/src/orxonox/worldentities/pawns/ModularSpaceShip.cc

    r10052 r10053  
    133133        this->entityPtrList_.push_back(one);
    134134
    135         this->createCSPtrList(this->getWorldEntityCollisionShape());
     135        //this->createCSPtrList(this->getWorldEntityCollisionShape());
    136136
    137137        orxout() << "New entity-part assignment created!" << endl;
     
    139139
    140140    // 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
    142142    {
    143143        for (int i=0; i < cs->getNumChildShapes(); i++)
     
    208208        //orxout() << "ShipPart of Entity " << cs->getUserPointer() << ": " << this->getPartOfEntity((StaticEntity*)(cs->getUserPointer())) << endl;
    209209
    210         orxout() << "CP before handleHit" << endl;
    211 
    212210        if (this->getPartOfEntity((StaticEntity*)(cs->getUserPointer())) != NULL)
    213211            this->getPartOfEntity((StaticEntity*)(cs->getUserPointer()))->handleHit(damage, healthdamage, shielddamage, originator);
     
    255253        this->partList_.push_back(part);
    256254        part->setParent(this);
    257         //part->addToSpaceShip(this); //FIXME: (noep) add
    258255        this->updatePartAssignment();
    259256    }
     
    267264    ShipPart* ModularSpaceShip::getShipPart(unsigned int index)
    268265    {
    269         if(this->partList_.size() >= index)
     266        if(this->partList_.size() <= index)
    270267            return NULL;
    271268        else
     
    339336        this->printBtChildShapes((btCompoundShape*)(this->getWorldEntityCollisionShape()->getCollisionShape()), 2, 0);
    340337        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);
    342339
    343340        // mass
Note: See TracChangeset for help on using the changeset viewer.