Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 30, 2012, 11:08:17 PM (12 years ago)
Author:
landauf
Message:

merged branch presentation2012merge back to trunk

Location:
code/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/infos/GametypeInfo.cc

    r9016 r9348  
    6868    {
    6969        RegisterObject(GametypeInfo);
    70        
     70
    7171        this->bStarted_ = false;
    7272        this->bEnded_ = false;
     
    165165        if(this->bStarted_)
    166166           { return;}
    167        
     167
    168168        this->bStarted_ = true;
    169169        this->changedStarted();
    170        
    171        
     170
     171
    172172    }
    173173
     
    195195        if(this->startCountdown_ == countdown || countdown < 0.0f)
    196196            return;
    197        
     197
    198198        this->startCountdown_ = countdown;
    199199        // Set the counter to the ceiling of the current countdown.
     
    225225        if(this->counter_ == 0)
    226226            return;
    227        
     227
    228228        this->counter_--;
    229229        this->changedCountdownCounter();
     
    325325        if(this->spawned_ == spawned)
    326326            return;
    327        
     327
    328328        this->spawned_ = spawned;
    329329        // Clear the notifications if the Player has spawned.
     
    395395    // TODO: Replace with notifications.
    396396
    397     void GametypeInfo::sendAnnounceMessage(const std::string& message)
     397    void GametypeInfo::sendAnnounceMessage(const std::string& message) const
    398398    {
    399399        if (GameMode::isMaster())
     
    404404    }
    405405
    406     void GametypeInfo::sendAnnounceMessage(const std::string& message, unsigned int clientID)
     406    void GametypeInfo::sendAnnounceMessage(const std::string& message, unsigned int clientID) const
    407407    {
    408408        if (GameMode::isMaster())
     
    415415    }
    416416
    417     void GametypeInfo::sendKillMessage(const std::string& message, unsigned int clientID)
     417    void GametypeInfo::sendKillMessage(const std::string& message, unsigned int clientID) const
    418418    {
    419419        if (GameMode::isMaster())
     
    426426    }
    427427
    428     void GametypeInfo::sendDeathMessage(const std::string& message, unsigned int clientID)
     428    void GametypeInfo::sendDeathMessage(const std::string& message, unsigned int clientID) const
    429429    {
    430430        if (GameMode::isMaster())
     
    437437    }
    438438
    439     void GametypeInfo::sendStaticMessage(const std::string& message, unsigned int clientID, const ColourValue& colour)
     439    void GametypeInfo::sendStaticMessage(const std::string& message, unsigned int clientID, const ColourValue& colour) const
    440440    {
    441441        if (GameMode::isMaster())
     
    448448    }
    449449
    450     void GametypeInfo::sendFadingMessage(const std::string& message, unsigned int clientID)
     450    void GametypeInfo::sendFadingMessage(const std::string& message, unsigned int clientID) const
    451451    {
    452452        if (GameMode::isMaster())
     
    459459    }
    460460
    461     void GametypeInfo::dispatchAnnounceMessage(const std::string& message)
     461    void GametypeInfo::dispatchAnnounceMessage(const std::string& message) const
    462462    {
    463463        for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it)
     
    465465    }
    466466
    467     void GametypeInfo::dispatchKillMessage(const std::string& message)
     467    void GametypeInfo::dispatchKillMessage(const std::string& message) const
    468468    {
    469469        for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it)
     
    471471    }
    472472
    473     void GametypeInfo::dispatchDeathMessage(const std::string& message)
     473    void GametypeInfo::dispatchDeathMessage(const std::string& message) const
    474474    {
    475475        for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it)
     
    477477    }
    478478
    479      void GametypeInfo::dispatchStaticMessage(const std::string& message, const ColourValue& colour)
     479     void GametypeInfo::dispatchStaticMessage(const std::string& message, const ColourValue& colour) const
    480480    {
    481481        for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it)
     
    483483    }
    484484
    485      void GametypeInfo::dispatchFadingMessage(const std::string& message)
     485     void GametypeInfo::dispatchFadingMessage(const std::string& message) const
    486486    {
    487487        for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it)
  • code/trunk/src/orxonox/infos/GametypeInfo.h

    r9016 r9348  
    6868                { return this->bStarted_; }
    6969            void changedStarted(void); // Is called when the game has changed to started.
    70            
     70
    7171            /**
    7272            @brief Get whether the game has ended yet.
     
    108108                { return this->readyToSpawn_; }
    109109            void changedReadyToSpawn(bool ready); // Inform the GametypeInfo that the local player has changed its spawned status.
    110            
     110
    111111            /**
    112112            @brief Get whether the local player is spawned.
     
    119119            inline const std::string& getHUDTemplate() const
    120120                { return this->hudtemplate_; }
    121            
    122             inline unsigned int getNumberOfPlayers() const
    123                 {  return this->spawnedPlayers_.size(); }
    124121
    125             void sendAnnounceMessage(const std::string& message);
    126             void sendAnnounceMessage(const std::string& message, unsigned int clientID);
    127             void sendKillMessage(const std::string& message, unsigned int clientID);
    128             void sendDeathMessage(const std::string& message, unsigned int clientID);
    129             void sendStaticMessage(const std::string& message, unsigned int clientID, const ColourValue& colour);
    130             void sendFadingMessage(const std::string& message, unsigned int clientID);
     122            void sendAnnounceMessage(const std::string& message) const;
     123            void sendAnnounceMessage(const std::string& message, unsigned int clientID) const;
     124            void sendKillMessage(const std::string& message, unsigned int clientID) const;
     125            void sendDeathMessage(const std::string& message, unsigned int clientID) const;
     126            void sendStaticMessage(const std::string& message, unsigned int clientID, const ColourValue& colour) const;
     127            void sendFadingMessage(const std::string& message, unsigned int clientID) const;
    131128
    132             void dispatchAnnounceMessage(const std::string& message);
    133             void dispatchKillMessage(const std::string& message);
    134             void dispatchDeathMessage(const std::string& message);
    135             void dispatchStaticMessage(const std::string& message,const ColourValue& colour);
    136             void dispatchFadingMessage(const std::string& message);
    137            
     129            void dispatchAnnounceMessage(const std::string& message) const;
     130            void dispatchKillMessage(const std::string& message) const;
     131            void dispatchDeathMessage(const std::string& message) const;
     132            void dispatchStaticMessage(const std::string& message,const ColourValue& colour) const;
     133            void dispatchFadingMessage(const std::string& message) const;
     134
    138135        protected:
    139136            void start(void); // Inform the GametypeInfo that the game has started.
     
    165162            unsigned int counter_; //!< The current integer value of the start countdown, the start countdown counter.
    166163            std::string hudtemplate_;
    167            
     164
    168165            std::set<PlayerInfo*> spawnedPlayers_; //!< A set of players that are currently spawned.
    169166            bool spawned_; //!< Whether the local Player is currently spawned.
  • code/trunk/src/orxonox/infos/PlayerInfo.cc

    r9257 r9348  
    173173        this->changedControllableEntity();
    174174
    175                 RadarViewable* radarviewable = orxonox_cast<RadarViewable*>(entity);
     175        RadarViewable* radarviewable = orxonox_cast<RadarViewable*>(entity);
    176176        if (radarviewable != NULL)
    177177            radarviewable->setRadarName(this->getName());
Note: See TracChangeset for help on using the changeset viewer.