Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 21, 2010, 6:50:07 PM (14 years ago)
Author:
scheusso
Message:

fixed to make everything network-compliant again

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation3/src/orxonox/interfaces/RadarViewable.cc

    r6942 r6961  
    3131#include "util/StringUtils.h"
    3232#include "core/CoreIncludes.h"
     33#include "core/GameMode.h"
    3334#include "worldentities/WorldEntity.h"
    3435#include "Radar.h"
     
    5253
    5354        this->uniqueId_=getUniqueNumberString();
    54         this->radar_ = this->creator_->getScene()->getRadar();
    55         this->radar_->addRadarObject(this);
     55        if( GameMode::showsGraphics() )
     56        {
     57            this->radar_ = this->creator_->getScene()->getRadar();
     58            this->radar_->addRadarObject(this);
     59        }
    5660        this->bInitialized_ = true;
    5761    }
     
    6064    RadarViewable::~RadarViewable()
    6165    {
     66       
    6267        if( this->bInitialized_ )
    63             this->radar_->removeRadarObject(this);
     68        {
     69            if( GameMode::showsGraphics() )
     70            {
     71                this->radar_->removeRadarObject(this);
     72            }
     73        }
    6474    }
    6575
     
    101111    void RadarViewable::settingsChanged()
    102112    {
    103         this->radar_->radarObjectChanged(this);
     113        if( GameMode::showsGraphics() )
     114        {
     115            this->radar_->radarObjectChanged(this);
     116        }
    104117    }
    105118}
Note: See TracChangeset for help on using the changeset viewer.