Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 6, 2009, 6:58:10 PM (15 years ago)
Author:
landauf
Message:

Using SmartPtr for CameraPositions in ControllableEntity.
This fixes a crash when finishing the pong level, because the static top-down camera was attached to the PongCenter and therefore destroyed before before the PongBat.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/orxonox/worldentities/ControllableEntity.h

    r5738 r5894  
    104104            void addCameraPosition(CameraPosition* position);
    105105            CameraPosition* getCameraPosition(unsigned int index) const;
    106             inline const std::list<CameraPosition*>& getCameraPositions() const
     106            inline const std::list<SmartPtr<CameraPosition> >& getCameraPositions() const
    107107                { return this->cameraPositions_; }
    108108
     
    198198            float mouseLookSpeed_;
    199199            Ogre::SceneNode* cameraPositionRootNode_;
    200             std::list<CameraPosition*> cameraPositions_;
     200            std::list<SmartPtr<CameraPosition> > cameraPositions_;
    201201            std::string cameraPositionTemplate_;
    202202            Controller* xmlcontroller_;
Note: See TracChangeset for help on using the changeset viewer.