Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 7, 2015, 5:21:45 PM (10 years ago)
Author:
frovelli
Message:

Implemented playercount in multiplayer lobby

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/multiplayerFS15/src/libraries/network/LANDiscovery.cc

    r10334 r10434  
    8989          {
    9090            packet::ServerInformation info(&event);
    91             orxout(internal_info, context::network) << "Received LAN discovery server information; Name: " << info.getServerName() << ", Address: " << info.getServerIP() << ", RTT: " << info.getServerRTT() << endl;
     91            orxout(internal_info, context::network) << "Received LAN discovery server information; Name: " << info.getServerName() << ", Address: " << info.getServerIP() << ", Players: " << info.getClientNumber() << ", RTT: " << info.getServerRTT() << endl;
    9292            std::vector<packet::ServerInformation>::iterator it;
    9393            for( it=this->servers_.begin(); it!=this->servers_.end(); ++it )
     
    132132      return Ogre::StringConverter::toString(serverrtt);
    133133    }
    134 
    135134  }
    136135
    137 
     136  std::string LANDiscovery::getServerListItemPlayerNumber(unsigned int index)
     137  {
     138    if( index >= this->servers_.size() )
     139      return BLANKSTRING;
     140    else{
     141      int playerNumber = this->servers_[index].getClientNumber();
     142      return Ogre::StringConverter::toString(playerNumber);
     143    }
     144  }
    138145} // namespace orxonox
Note: See TracChangeset for help on using the changeset viewer.