Fixed waiting screen.

This commit is contained in:
hiker
2016-03-10 09:29:53 +11:00
parent b4d4f770ca
commit fc38acbea4
2 changed files with 6 additions and 8 deletions

View File

@@ -91,7 +91,7 @@ public:
// ------------------------------------------------------------------------
/** \brief Get the players that are in the game
* \return A vector containing pointers on the players profiles. */
const std::vector<NetworkPlayerProfile*>& getPlayers()
const std::vector<NetworkPlayerProfile*>& getPlayers() const
{
return m_players;
} // getPlayers

View File

@@ -64,16 +64,14 @@ void WaitingForOthersScreen::init()
void WaitingForOthersScreen::onUpdate(float dt)
{
const std::vector<STKPeer*>& peers = STKHost::get()->getPeers();
const GameSetup *setup = STKHost::get()->getGameSetup();
const std::vector<NetworkPlayerProfile*> &all_profiles = setup->getPlayers();
RaceConfig* config = STKHost::get()->getGameSetup()->getRaceConfig();
core::stringw w;
for (unsigned int i = 0; i < peers.size(); i++)
for (unsigned int i = 0; i < all_profiles.size(); i++)
{
//race_manager->get
STKPeer* peer = peers[i];
NetworkPlayerProfile* profile = peer->getPlayerProfile();
const NetworkPlayerProfile* profile = all_profiles[i];
if (profile == NULL)
continue;
core::stringw name = profile->getName();