Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 28, 2012, 12:28:44 PM (13 years ago)
Author:
landauf
Message:

renamed RVName to radarname
cast to RadarViewable instead of SpaceShip to set the name (in PlayerInfo)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/infos/PlayerInfo.cc

    r9016 r9257  
    3636#include "worldentities/ControllableEntity.h"
    3737#include "controllers/Controller.h"
    38 #include "worldentities/pawns/SpaceShip.h"
     38#include "interfaces/RadarViewable.h"
    3939
    4040namespace orxonox
     
    5858
    5959        this->registerVariables();
    60        
     60
    6161    }
    6262
     
    154154        while (this->previousControllableEntity_.size() > 0)
    155155            this->stopTemporaryControl();
    156        
     156
    157157        if (this->controllableEntity_)
    158158            this->stopControl();
     
    172172
    173173        this->changedControllableEntity();
    174                 SpaceShip* spaceship = dynamic_cast<SpaceShip*>(entity);
    175         if (spaceship != NULL)
    176         {
    177             spaceship->setRVName(this->getName());
    178         }
     174
     175                RadarViewable* radarviewable = orxonox_cast<RadarViewable*>(entity);
     176        if (radarviewable != NULL)
     177            radarviewable->setRadarName(this->getName());
    179178    }
    180179
     
    244243        if(this->isHumanPlayer()) // TODO: Multiplayer?
    245244            this->controllableEntity_->destroyHud(); // HACK-ish
    246        
     245
    247246//        this->controllableEntity_ = this->previousControllableEntity_.back();
    248247        do {
Note: See TracChangeset for help on using the changeset viewer.