Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10420 for code/branches


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
Files:
4 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/orxonox/CMakeLists.txt

    r10216 r10420  
    2929  Main.cc
    3030  MoodManager.cc
    31   PawnManager.cc
    3231  PlayerManager.cc
    33   ShipPartManager.cc
    3432  Radar.cc
    3533#  Test.cc
  • code/branches/core7/src/orxonox/OrxonoxPrereqs.h

    r10281 r10420  
    7373    class LevelInfoItem;
    7474    class LevelManager;
    75     class PawnManager;
    7675    class PlayerManager;
    7776    class Radar;
  • code/branches/core7/src/orxonox/collisionshapes/CollisionShape.cc

    r10417 r10420  
    7878        {
    7979            if (this->getScene() && this->getScene()->isUpdatingPhysics())
    80                 orxout(internal_error) << "Don't destroy collision shapes while the physics is updated! This will lead to crashes" << endl;
     80                orxout(internal_error) << "Don't destroy collision shapes while the physics is updated! This will lead to crashes. Try to use destroyLater() instead" << endl;
    8181
    8282            if (this->parent_)
  • 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
  • code/branches/core7/src/orxonox/worldentities/pawns/Pawn.cc

    r10216 r10420  
    326326        if (this->getGametype() && this->getGametype()->allowPawnDeath(this, this->lastHitOriginator_))
    327327        {
    328             // Set bAlive_ to false and wait for PawnManager to do the destruction
     328            // Set bAlive_ to false and wait for destroyLater() to do the destruction
    329329            this->bAlive_ = false;
     330            this->destroyLater();
    330331
    331332            this->setDestroyWhenPlayerLeft(false);
Note: See TracChangeset for help on using the changeset viewer.