Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9341


Ignore:
Timestamp:
Aug 21, 2012, 7:28:51 PM (12 years ago)
Author:
jo
Message:

Corrected getNumberOfPlayers().

Location:
code/branches/presentation2012merge/src/orxonox/gametypes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2012merge/src/orxonox/gametypes/Dynamicmatch.cc

    r9340 r9341  
    336336        numberOf[chaser]++;
    337337        Gametype::playerEntered(player);
    338         orxout() << "# Players(2) : " << this->getNumberOfPlayers() <<endl;
    339         orxout() << "# Players(3): " << this->getPlayerCount() <<endl;
    340338        const std::string& message = player->getName() + " entered the game";
    341339        ChatManager::message(message);
     
    357355            //remove player from map
    358356            playerParty_.erase (player);
    359             orxout() << "# Players(2) : " << this->getNumberOfPlayers() <<endl;
    360             orxout() << "# Players(3): " << this->getPlayerCount() <<endl;
    361357            //adjust player parties
    362358            evaluatePlayerParties();
  • code/branches/presentation2012merge/src/orxonox/gametypes/Gametype.cc

    r9339 r9341  
    183183        this->players_[player].state_ = PlayerState::Joined;
    184184        this->gtinfo_->playerEntered(player);
    185         orxout() << "# Players: " << this->getNumberOfPlayers() <<endl;
    186185    }
    187186
     
    192191        {
    193192            this->players_.erase(it);
    194             orxout() << "# Players: " << this->getNumberOfPlayers() <<endl;
    195193            return true;
    196194        }
  • code/branches/presentation2012merge/src/orxonox/gametypes/Gametype.h

    r9339 r9341  
    154154
    155155            /**
    156             @brief Get number of Players.
    157             Note that only those players are counted that were added before the game started.
     156            @brief Get number of Players in game.
    158157            */
    159158            inline unsigned int getNumberOfPlayers() const
    160                 { return this->gtinfo_->getNumberOfPlayers(); }
     159                { return this->players_.size(); }
     160
     161
    161162
    162163        protected:
Note: See TracChangeset for help on using the changeset viewer.