Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6815 for code


Ignore:
Timestamp:
May 2, 2010, 1:39:33 PM (15 years ago)
Author:
gnadler
Message:

trying to destroy RocketController within SimpleRocket destroyer but doesn't work…

Location:
code/branches/rocket/src/modules/weapons
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/rocket/src/modules/weapons/RocketController.cc

    r6814 r6815  
    3131#include "util/Math.h"
    3232#include "weapons/projectiles/SimpleRocket.h"
     33#include "util/Debug.h"
    3334
    3435
     
    4142    RocketController::RocketController(BaseObject* creator) : Controller(creator)
    4243    {
     44                COUT(0)<< "RocketController constructed\n";
    4345
    4446        RegisterObject(RocketController);
     
    6971
    7072        RocketController::~RocketController() {
    71 
    72                 delete this->getControllableEntity();
     73                COUT(0)<< "RocketController destroyed\n";
     74                delete this;
    7375
    7476        }
  • code/branches/rocket/src/modules/weapons/projectiles/SimpleRocket.cc

    r6813 r6815  
    4141#include "weapons/RocketController.h"
    4242#include "sound/WorldSound.h"
     43#include "util/Debug.h"
    4344
    4445namespace orxonox
     
    5859        this->bDestroy_ = false;
    5960        this->lifetime_ = 100;
     61                COUT(0)<< "simplerocket constructed\n";
    6062                //this->camera_ = null;
    6163                //RocketController* myRController = new RocketController(this);
     
    102104    SimpleRocket::~SimpleRocket()
    103105    {
     106                COUT(0)<< "simplerocket destroyed\n";
     107                delete this->getController();
    104108    }
    105109
Note: See TracChangeset for help on using the changeset viewer.