Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9404 in orxonox.OLD


Ignore:
Timestamp:
Jul 24, 2006, 10:05:52 AM (18 years ago)
Author:
patrick
Message:

yet another strang bug occured. flush

Location:
branches/proxy/src/lib/network
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/monitor/network_monitor.cc

    r9400 r9404  
    3333SHELL_COMMAND(showGUI, NetworkMonitor, showGUI);
    3434SHELL_COMMAND(hideGUI, NetworkMonitor, hideGUI);
    35 // SHELL_COMMAND(output, MappedWater, saveParams);
     35SHELL_COMMAND(debug, NetworkMonitor, debug);
    3636
    3737
     
    106106    if( *it == node)
    107107    {
     108      if( node->getNodeType() == NET_CLIENT)
     109        this->playerNumber--;
     110
    108111      this->nodeList.erase(it);
    109       this->playerNumber--;
    110112      return;
    111113    }
  • branches/proxy/src/lib/network/monitor/network_monitor.h

    r9396 r9404  
    6565    inline int getPlayerNumber() { return this->playerNumber; }
    6666
    67     /** @returns true if there are still free network slots available */
     67    /** @returns true if there are still free network slots available at the local node*/
    6868    inline bool gotFreeSlots() { return (this->localNode->getPlayerNumber() < SharedNetworkData::getInstance()->getMaxPlayer())?true:false; }
    6969    /** @param node node to be checked for slots @returns true if there are still free network slots available at this node */
     
    8989
    9090    int                          playerNumber;                 //!< total number of players in the game
     91    int                          connectionNumber;             //!< total number of connections at this localhost
    9192};
    9293
  • branches/proxy/src/lib/network/monitor/network_node.cc

    r9347 r9404  
    4343  this->clientList.push_back(node);
    4444  this->playerNumber++;
     45  this->connectionNumber++;
    4546}
    4647
     
    5152{
    5253  this->activeProxyServerList.push_back(node);
    53   this->playerNumber++;
     54  this->connectionNumber++;
    5455}
    5556
  • branches/proxy/src/lib/network/monitor/network_node.h

    r9396 r9404  
    5959  private:
    6060    int                          playerNumber;                 //!< localy direct connected player number
     61    int                          connectionNumber;             //!< number of connections ( can but musn't be equal players)
    6162    PeerInfo*                    peerInfo;                     //!< the peer informationa about this node
    6263
  • branches/proxy/src/lib/network/network_manager.cc

    r9398 r9404  
    105105int NetworkManager::createMasterServer(unsigned int port)
    106106{
    107   // init the proxy settings data do this before everything else is done here
    108   NetworkSettings::getInstance()->loadData();
    109 
    110107  // create the network stream
    111108  this->networkStream = new NetworkStream(NET_MASTER_SERVER);
  • branches/proxy/src/lib/network/network_stream.cc

    r9402 r9404  
    720720      // server fakes uniqueid == 0 for handshake
    721721      if ( ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer() ) &&
    722              sync.getUniqueID() <= SharedNetworkData::getInstance()->getMaxPlayer())
     722             sync.getUniqueID() <= SharedNetworkData::getInstance()->getMaxPlayer() + 1) // plus one to handle one client more than the max to redirect it
    723723        n = Converter::intToByteArray( 0, buf + offset, UDP_PACKET_SIZE - offset );
    724724      else
Note: See TracChangeset for help on using the changeset viewer.