Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 17, 2009, 10:59:25 AM (15 years ago)
Author:
scheusso
Message:

trying to make CE change possible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/particles2/src/modules/weapons/projectiles/Rocket.cc

    r6066 r6079  
    3535#include "graphics/Model.h"
    3636#include "objects/collisionshapes/ConeCollisionShape.h"
     37#include "infos/PlayerInfo.h"
     38#include "controllers/Controller.h"
     39#include "worldentities/CameraPosition.h"
    3740
    3841namespace orxonox
     
    6972            this->destroyTimer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&Rocket::destroyObject, this)));
    7073        }
     74       
     75        this->camPosition_ = new CameraPosition(this);
     76        this->camPosition_->setPosition(0,0,0);
     77        this->attach( this->camPosition_ );
     78        this->addCameraPosition( this->camPosition_ );
    7179    }
    7280
     
    8189            this->collisionShape_->destroy();
    8290            this->model_->destroy();
     91           
     92            if (GameMode::isMaster() && this->owner_)
     93                this->owner_->getPlayer()->startControl(this->originalControllableEntity_);
     94            this->camPosition_->destroy();
    8395        }
    8496    }
     
    97109    {
    98110        this->owner_ = owner;
     111           
     112        this->originalControllableEntity_ = this->owner_->getPlayer()->getControllableEntity();
     113        this->owner_->getPlayer()->startControl(this);
    99114    }
    100115
Note: See TracChangeset for help on using the changeset viewer.