Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 9, 2015, 1:11:13 PM (9 years ago)
Author:
landauf
Message:

BaseObject returns plain pointers instead of StrongPtrs for Namespace, Level, Scene, and Gametype.

Location:
code/branches/core7/src/modules
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/modules/dodgerace/DodgeRaceCenterPoint.cc

    r10232 r10571  
    6666        if (this->getGametype() != NULL && this->getGametype()->isA(Class(DodgeRace)))
    6767        {
    68             DodgeRace* DodgeRaceGametype = orxonox_cast<DodgeRace*>(this->getGametype().get());
     68            DodgeRace* DodgeRaceGametype = orxonox_cast<DodgeRace*>(this->getGametype());
    6969            DodgeRaceGametype->setCenterpoint(this);
    7070        }
  • code/branches/core7/src/modules/dodgerace/DodgeRaceHUDinfo.cc

    r10236 r10571  
    8282        if (this->getOwner() && this->getOwner()->getGametype())
    8383        {
    84             this->DodgeRaceGame = orxonox_cast<DodgeRace*>(this->getOwner()->getGametype().get());
     84            this->DodgeRaceGame = orxonox_cast<DodgeRace*>(this->getOwner()->getGametype());
    8585        }
    8686        else
  • code/branches/core7/src/modules/gametypes/OldRaceCheckPoint.cc

    r9667 r10571  
    6161        SUPER(OldRaceCheckPoint, tick, dt);
    6262
    63         OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype().get());
     63        OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype());
    6464        assert(gametype);
    6565        if (this->getCheckpointIndex() == gametype->getCheckpointsReached())
     
    8282        DistanceTrigger::triggered(bIsTriggered);
    8383
    84         OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype().get());
     84        OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype());
    8585        if (gametype && this->getCheckpointIndex() == gametype->getCheckpointsReached() && bIsTriggered)
    8686        {
     
    107107        if (this->bTimeLimit_ != 0)
    108108        {
    109             OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype().get());
     109            OldSpaceRace* gametype = orxonox_cast<OldSpaceRace*>(this->getGametype());
    110110            if (gametype)
    111111            {
  • code/branches/core7/src/modules/gametypes/SpaceRaceManager.cc

    r9667 r10571  
    4646    {
    4747        RegisterObject(SpaceRaceManager);
    48         this->race_ = orxonox_cast<SpaceRace*>(this->getGametype().get());
     48        this->race_ = orxonox_cast<SpaceRace*>(this->getGametype());
    4949        assert(race_);
    5050        //amountOfPlayers=(race_->getPlayers()).size();
     
    139139    void SpaceRaceManager::checkpointReached(RaceCheckPoint* newCheckpoint, PlayerInfo* player)
    140140    {
    141         SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype().get());
     141        SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype());
    142142        assert(gametype);
    143143        if (!gametype)
  • code/branches/core7/src/modules/invader/InvaderCenterPoint.cc

    r9943 r10571  
    6666        if (this->getGametype() != NULL && this->getGametype()->isA(Class(Invader)))
    6767        {
    68             Invader* InvaderGametype = orxonox_cast<Invader*>(this->getGametype().get());
     68            Invader* InvaderGametype = orxonox_cast<Invader*>(this->getGametype());
    6969            InvaderGametype->setCenterpoint(this);
    7070        }
  • code/branches/core7/src/modules/invader/InvaderHUDinfo.cc

    r9961 r10571  
    128128        if (this->getOwner() && this->getOwner()->getGametype())
    129129        {
    130             this->InvaderGame = orxonox_cast<Invader*>(this->getOwner()->getGametype().get());
     130            this->InvaderGame = orxonox_cast<Invader*>(this->getOwner()->getGametype());
    131131        }
    132132        else
  • code/branches/core7/src/modules/jump/JumpCenterpoint.cc

    r10262 r10571  
    9191        if (getGametype() != NULL && this->getGametype()->isA(Class(Jump)))
    9292        {
    93             Jump* jumpGametype = orxonox_cast<Jump*>(this->getGametype().get());
     93            Jump* jumpGametype = orxonox_cast<Jump*>(this->getGametype());
    9494            jumpGametype->setCenterpoint(this);
    9595        }
  • code/branches/core7/src/modules/jump/JumpScore.cc

    r10262 r10571  
    119119        if (this->getOwner() != NULL && this->getOwner()->getGametype())
    120120        {
    121             this->owner_ = orxonox_cast<Jump*>(this->getOwner()->getGametype().get());
     121            this->owner_ = orxonox_cast<Jump*>(this->getOwner()->getGametype());
    122122        }
    123123        else
  • code/branches/core7/src/modules/mini4dgame/Mini4DgameBoard.cc

    r10230 r10571  
    919919        if (this->getGametype() != NULL && this->getGametype()->isA(Class(Mini4Dgame)))
    920920        {
    921             Mini4Dgame* Mini4DgameGametype = orxonox_cast<Mini4Dgame*>(this->getGametype().get());
     921            Mini4Dgame* Mini4DgameGametype = orxonox_cast<Mini4Dgame*>(this->getGametype());
    922922            Mini4DgameGametype->setGameboard(this);
    923923        }
  • code/branches/core7/src/modules/objects/triggers/CheckPoint.cc

    r9667 r10571  
    9393        DistanceTrigger::triggered(bIsTriggered);
    9494
    95         Asteroids* gametype = orxonox_cast<Asteroids*>(this->getGametype().get());
     95        Asteroids* gametype = orxonox_cast<Asteroids*>(this->getGametype());
    9696        if (gametype)
    9797        {
  • code/branches/core7/src/modules/overlays/hud/LastManStandingInfos.cc

    r9667 r10571  
    8787        {
    8888            this->player_ = orxonox_cast<PlayerInfo*>(this->getOwner());
    89             this->lms_ = orxonox_cast<LastManStanding*>(this->getOwner()->getGametype().get());
     89            this->lms_ = orxonox_cast<LastManStanding*>(this->getOwner()->getGametype());
    9090        }
    9191        else
  • code/branches/core7/src/modules/overlays/hud/LastTeamStandingInfos.cc

    r9667 r10571  
    8787        {
    8888            this->player_ = orxonox_cast<PlayerInfo*>(this->getOwner());
    89             this->lts_ = orxonox_cast<LastTeamStanding*>(this->getOwner()->getGametype().get());
     89            this->lts_ = orxonox_cast<LastTeamStanding*>(this->getOwner()->getGametype());
    9090        }
    9191        else
  • code/branches/core7/src/modules/overlays/hud/TeamBaseMatchScore.cc

    r9667 r10571  
    118118
    119119        if (this->getOwner() && this->getOwner()->getGametype())
    120             this->owner_ = orxonox_cast<TeamBaseMatch*>(this->getOwner()->getGametype().get());
     120            this->owner_ = orxonox_cast<TeamBaseMatch*>(this->getOwner()->getGametype());
    121121        else
    122122            this->owner_ = 0;
  • code/branches/core7/src/modules/pong/PongCenterpoint.cc

    r9667 r10571  
    9898        if (this->getGametype() != NULL && this->getGametype()->isA(Class(Pong)))
    9999        {
    100             Pong* pongGametype = orxonox_cast<Pong*>(this->getGametype().get());
     100            Pong* pongGametype = orxonox_cast<Pong*>(this->getGametype());
    101101            pongGametype->setCenterpoint(this);
    102102        }
  • code/branches/core7/src/modules/pong/PongScore.cc

    r9939 r10571  
    170170
    171171        if (this->getOwner() != NULL && this->getOwner()->getGametype())
    172             this->owner_ = orxonox_cast<Pong*>(this->getOwner()->getGametype().get());
     172            this->owner_ = orxonox_cast<Pong*>(this->getOwner()->getGametype());
    173173        else
    174174            this->owner_ = 0;
  • code/branches/core7/src/modules/tetris/TetrisBrick.cc

    r10262 r10571  
    169169        if (this->getGametype() != NULL && this->getGametype()->isA(Class(Tetris)))
    170170        {
    171             Tetris* tetrisGametype = orxonox_cast<Tetris*>(this->getGametype().get());
     171            Tetris* tetrisGametype = orxonox_cast<Tetris*>(this->getGametype());
    172172            return tetrisGametype;
    173173        }
  • code/branches/core7/src/modules/tetris/TetrisCenterpoint.cc

    r9667 r10571  
    9898        if (this->getGametype() != NULL && this->getGametype()->isA(Class(Tetris)))
    9999        {
    100             Tetris* tetrisGametype = orxonox_cast<Tetris*>(this->getGametype().get());
     100            Tetris* tetrisGametype = orxonox_cast<Tetris*>(this->getGametype());
    101101            tetrisGametype->setCenterpoint(this);
    102102        }
  • code/branches/core7/src/modules/tetris/TetrisScore.cc

    r10262 r10571  
    118118
    119119        if (this->getOwner() != NULL && this->getOwner()->getGametype())
    120             this->owner_ = orxonox_cast<Tetris*>(this->getOwner()->getGametype().get());
     120            this->owner_ = orxonox_cast<Tetris*>(this->getOwner()->getGametype());
    121121        else
    122122            this->owner_ = 0;
  • code/branches/core7/src/modules/towerdefense/TowerDefenseCenterpoint.cc

    r9667 r10571  
    103103        {
    104104            // Sets the centerpoint of the gametype. The gametype uses this to later spawn in towers, he needs the tower template stored in the center point
    105             TowerDefense* towerDefenseGametype = orxonox_cast<TowerDefense*>(this->getGametype().get());
     105            TowerDefense* towerDefenseGametype = orxonox_cast<TowerDefense*>(this->getGametype());
    106106            towerDefenseGametype->setCenterpoint(this);
    107107        }
  • code/branches/core7/src/modules/towerdefense/TowerDefenseEnemy.cc

    r10557 r10571  
    2929        this->setCollisionType(WorldEntity::Dynamic);
    3030        //needed to keep track of the PlayerStats coded in TowerDefense.h
    31         this->td = orxonox_cast<TowerDefense*>(this->getGametype().get());
     31        this->td = orxonox_cast<TowerDefense*>(this->getGametype());
    3232        once_=false;
    3333
  • code/branches/core7/src/modules/towerdefense/TowerDefenseHUDController.cc

    r10258 r10571  
    8080            if (this->getOwner() && this->getOwner()->getGametype())
    8181                    {
    82                         this->td = orxonox_cast<TowerDefense*>(this->getOwner()->getGametype().get());
     82                        this->td = orxonox_cast<TowerDefense*>(this->getOwner()->getGametype());
    8383                    }
    8484                    else
Note: See TracChangeset for help on using the changeset viewer.