Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2016, 10:29:21 PM (8 years ago)
Author:
landauf
Message:

merged branch cpp11_v3 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

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

    r10624 r11071  
    291291        if(GameMode::isMaster())
    292292        {
    293             NotificationListener::sendNotification("Press [Fire] to respawn", GametypeInfo::NOTIFICATION_SENDER, notificationMessageType::info, notificationSendMode::network, player->getClientID());
     293            NotificationListener::sendNotification("Press [Fire] to respawn", GametypeInfo::NOTIFICATION_SENDER, NotificationMessageType::info, NotificationSendMode::network, player->getClientID());
    294294            // Remove the player from the list of players that have spawned, since it currently is not.
    295295            this->spawnedPlayers_.erase(player);
     
    346346                // Display "Press [Fire] to start the match" if the game has not yet ended.
    347347                if(!this->hasEnded())
    348                     NotificationListener::sendNotification("Press [Fire] to start the match", GametypeInfo::NOTIFICATION_SENDER, notificationMessageType::info, notificationSendMode::network, player->getClientID());
     348                    NotificationListener::sendNotification("Press [Fire] to start the match", GametypeInfo::NOTIFICATION_SENDER, NotificationMessageType::info, NotificationSendMode::network, player->getClientID());
    349349                // Else display "Game has ended".
    350350                else
    351                     NotificationListener::sendNotification("Game has ended", GametypeInfo::NOTIFICATION_SENDER, notificationMessageType::info, notificationSendMode::network, player->getClientID());
     351                    NotificationListener::sendNotification("Game has ended", GametypeInfo::NOTIFICATION_SENDER, NotificationMessageType::info, NotificationSendMode::network, player->getClientID());
    352352            }
    353353        }
     
    461461    void GametypeInfo::dispatchAnnounceMessage(const std::string& message) const
    462462    {
    463         for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it)
    464             it->announcemessage(this, message);
     463        for (GametypeMessageListener* listener : ObjectList<GametypeMessageListener>())
     464            listener->announcemessage(this, message);
    465465    }
    466466
    467467    void GametypeInfo::dispatchKillMessage(const std::string& message) const
    468468    {
    469         for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it)
    470             it->killmessage(this, message);
     469        for (GametypeMessageListener* listener : ObjectList<GametypeMessageListener>())
     470            listener->killmessage(this, message);
    471471    }
    472472
    473473    void GametypeInfo::dispatchDeathMessage(const std::string& message) const
    474474    {
    475         for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it)
    476             it->deathmessage(this, message);
     475        for (GametypeMessageListener* listener : ObjectList<GametypeMessageListener>())
     476            listener->deathmessage(this, message);
    477477    }
    478478
    479479     void GametypeInfo::dispatchStaticMessage(const std::string& message, const ColourValue& colour) const
    480480    {
    481         for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it)
    482             it->staticmessage(this, message, colour);
     481        for (GametypeMessageListener* listener : ObjectList<GametypeMessageListener>())
     482            listener->staticmessage(this, message, colour);
    483483    }
    484484
    485485     void GametypeInfo::dispatchFadingMessage(const std::string& message) const
    486486    {
    487         for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it)
    488             it->fadingmessage(this, message);
     487        for (GametypeMessageListener* listener : ObjectList<GametypeMessageListener>())
     488            listener->fadingmessage(this, message);
    489489    }
    490490}
Note: See TracChangeset for help on using the changeset viewer.