Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 3, 2015, 3:02:05 PM (10 years ago)
Author:
landauf
Message:

use destroyLater() in Pawn and ShipPart. PawnManager and ShipPartManager are not needed anymore.

Location:
code/branches/core7/src/orxonox/items
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/orxonox/items/ShipPart.cc

    r10414 r10420  
    5353    {
    5454        RegisterObject(ShipPart);
    55         this->alive_ = true;
    5655        this->eventExecution_ = true;
    5756        this->healthMem_ = 100;
     
    9089    void ShipPart::death()
    9190    {
    92         //if (!(this->isAlive()))
    93             //return;
    94 
    9591        this->explode();
    96         this->setAlive(false);
    9792
    9893        if(eventExecution_)
     
    10499            }
    105100        }
     101
     102        this->destroyLater();
    106103    }
    107104
     
    203200    {
    204201        this->health_ = health;
    205     }
    206 
    207     void ShipPart::setAlive(bool var)
    208     {
    209         this->alive_ = var;
    210         orxout() << "ShipPart " << this->getName() << " alive_: " << this->alive_ << endl;
    211202    }
    212203
  • code/branches/core7/src/orxonox/items/ShipPart.h

    r10262 r10420  
    7272                { return this->parent_; }
    7373
    74             void setAlive(bool var);
    75             inline bool isAlive()
    76                 { return this->alive_; }
    77 
    7874            inline void setEventExecution(bool var)
    7975                { this->eventExecution_ = var; }
     
    121117            std::vector<PartDestructionEvent*> eventList_;  // The list of all PartDestructionEvent assigned to this ShipPart.
    122118
    123             bool alive_;
    124119            bool eventExecution_;
    125120
Note: See TracChangeset for help on using the changeset viewer.