Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 4, 2015, 9:12:21 PM (9 years ago)
Author:
landauf
Message:

merged branch core7 back to trunk

Location:
code/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/worldentities/ControllableEntity.cc

    r9799 r10624  
    3636#include "core/GameMode.h"
    3737#include "core/XMLPort.h"
    38 #include "network/NetworkFunction.h"
     38#include "network/NetworkFunctionIncludes.h"
    3939
    4040#include "Scene.h"
     
    108108                this->camera_->destroy();
    109109
    110             for (std::list<SmartPtr<CameraPosition> >::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
     110            for (std::list<StrongPtr<CameraPosition> >::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
    111111                (*it)->destroy();
    112112
     
    165165    {
    166166        unsigned int i = 0;
    167         for (std::list<SmartPtr<CameraPosition> >::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
     167        for (std::list<StrongPtr<CameraPosition> >::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
    168168        {
    169169            if (i == index)
     
    180180
    181181        unsigned int counter = 0;
    182         for (std::list<SmartPtr<CameraPosition> >::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
     182        for (std::list<StrongPtr<CameraPosition> >::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
    183183        {
    184184            if ((*it) == this->currentCameraPosition_)
     
    215215            {
    216216                this->cameraPositions_.front()->attachCamera(this->camera_);
    217                 this->currentCameraPosition_ = this->cameraPositions_.front().get();
     217                this->currentCameraPosition_ = this->cameraPositions_.front();
    218218            }
    219219            else if (this->cameraPositions_.size() > 0)
    220220            {
    221                 for (std::list<SmartPtr<CameraPosition> >::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
     221                for (std::list<StrongPtr<CameraPosition> >::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
    222222                {
    223223                    if ((*it) == this->camera_->getParent())
     
    307307        else
    308308        {
    309             callMemberNetworkFunction(ControllableEntity, fire, this->getObjectID(), 0, firemode);
     309            callMemberNetworkFunction(&ControllableEntity::fire, this->getObjectID(), 0, firemode);
    310310        }
    311311    }
     
    323323            if ( target != 0 )
    324324            {
    325                 callMemberNetworkFunction(ControllableEntity, setTargetInternal, this->getObjectID(), 0, target->getObjectID() );
     325                callMemberNetworkFunction(&ControllableEntity::setTargetInternal, this->getObjectID(), 0, target->getObjectID() );
    326326            }
    327327           else
    328328           {
    329                 callMemberNetworkFunction(ControllableEntity, setTargetInternal, this->getObjectID(), 0, OBJECTID_UNKNOWN );
     329                callMemberNetworkFunction(&ControllableEntity::setTargetInternal, this->getObjectID(), 0, OBJECTID_UNKNOWN );
    330330           }
    331331        }
     
    477477        if (parent)
    478478        {
    479             for (std::list<SmartPtr<CameraPosition> >::iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
     479            for (std::list<StrongPtr<CameraPosition> >::iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
    480480                if ((*it)->getIsAbsolute())
    481481                    parent->attach((*it));
  • code/trunk/src/orxonox/worldentities/ControllableEntity.h

    r10437 r10624  
    121121            void addCameraPosition(CameraPosition* position);
    122122            CameraPosition* getCameraPosition(unsigned int index) const;
    123             inline const std::list<SmartPtr<CameraPosition> >& getCameraPositions() const
     123            inline const std::list<StrongPtr<CameraPosition> >& getCameraPositions() const
    124124                { return this->cameraPositions_; }
    125125            unsigned int getCurrentCameraIndex() const;
     
    162162
    163163            inline Controller* getController() const
    164                 { return this->controller_.get(); }
     164                { return this->controller_; }
    165165            void setController(Controller* val);
    166166
     
    168168            virtual void setTarget( WorldEntity* target );
    169169            virtual WorldEntity* getTarget()
    170                 { return this->target_.get(); }
     170                { return this->target_; }
    171171            void setTargetInternal( uint32_t targetID );
    172172
     
    242242            bool bMouseLook_;
    243243            float mouseLookSpeed_;
    244             std::list<SmartPtr<CameraPosition> > cameraPositions_;
     244            std::list<StrongPtr<CameraPosition> > cameraPositions_;
    245245            CameraPosition* currentCameraPosition_;
    246246            std::string cameraPositionTemplate_;
  • code/trunk/src/orxonox/worldentities/WorldEntity.cc

    r10288 r10624  
    6161    BOOST_STATIC_ASSERT((int)Ogre::Node::TS_WORLD  == (int)WorldEntity::World);
    6262
    63     RegisterAbstractClass(WorldEntity).inheritsFrom(Class(BaseObject)).inheritsFrom(Class(Synchronisable));
     63    RegisterAbstractClass(WorldEntity).inheritsFrom<BaseObject>().inheritsFrom<Synchronisable>();
    6464
    6565    /**
     
    130130                WorldEntity* entity = *it;
    131131
    132                 // do this for all children, because even if getDeleteWithParent() returns true a child might still stay active due to smart pointers pointing to it
     132                // do this for all children, because even if getDeleteWithParent() returns true a child might still stay active due to strong pointers pointing to it
    133133                entity->setPosition(entity->getWorldPosition());
    134134                this->detach(entity); // detach also erases the element from the children set
  • code/trunk/src/orxonox/worldentities/pawns/Destroyer.cc

    r9667 r10624  
    4040        RegisterObject(Destroyer);
    4141
    42         UnderAttack* gametype = orxonox_cast<UnderAttack*>(this->getGametype().get());
     42        UnderAttack* gametype = orxonox_cast<UnderAttack*>(this->getGametype());
    4343        if (gametype)
    4444        {
  • code/trunk/src/orxonox/worldentities/pawns/ModularSpaceShip.cc

    r10270 r10624  
    3737#include "util/Math.h"
    3838#include "gametypes/Gametype.h"
    39 #include "core/command/ConsoleCommand.h"
     39#include "core/command/ConsoleCommandIncludes.h"
    4040
    4141#include "items/ShipPart.h"
     
    6969        if (this->isInitialized())
    7070        {
    71 
     71            while (!this->partList_.empty())
     72                this->partList_[0]->destroy();
    7273        }
    7374    }
     
    177178            if (it->second->getName() == name)
    178179            {
    179                 it->second->setAlive(false);
     180                it->second->death();
    180181                return;
    181182            }
     
    196197            if (it->second->getName() == name)
    197198            {
    198                 it->second->setAlive(false);
     199                it->second->death();
    199200                return;
    200201            }
  • code/trunk/src/orxonox/worldentities/pawns/Pawn.cc

    r10622 r10624  
    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);
  • code/trunk/src/orxonox/worldentities/pawns/Spectator.cc

    r9667 r10624  
    3434#include "core/GameMode.h"
    3535#include "core/command/CommandExecutor.h"
    36 #include "core/command/ConsoleCommand.h"
     36#include "core/command/ConsoleCommandIncludes.h"
    3737
    3838#include "tools/BillboardSet.h"
  • code/trunk/src/orxonox/worldentities/pawns/TeamBaseMatchBase.cc

    r9667 r10624  
    4545        this->state_ = BaseState::Uncontrolled;
    4646
    47         TeamBaseMatch* gametype = orxonox_cast<TeamBaseMatch*>(this->getGametype().get());
     47        TeamBaseMatch* gametype = orxonox_cast<TeamBaseMatch*>(this->getGametype());
    4848        if (gametype)
    4949        {
     
    5858        this->fireEvent();
    5959
    60         TeamDeathmatch* gametype = orxonox_cast<TeamDeathmatch*>(this->getGametype().get());
     60        TeamDeathmatch* gametype = orxonox_cast<TeamDeathmatch*>(this->getGametype());
    6161        if (!gametype)
    6262            return;
Note: See TracChangeset for help on using the changeset viewer.