Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9327 in orxonox.OLD for branches/proxy/src/lib/network/monitor


Ignore:
Timestamp:
Jul 18, 2006, 4:29:59 PM (18 years ago)
Author:
patrick
Message:

player number model switched

File:
1 edited

Legend:

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

    r9308 r9327  
    99#include "base_object.h"
    1010#include "synchronizeable.h"
     11#include "shared_network_data.h"
    1112
    1213#include "network_node.h"
     
    5859
    5960    /** @returns true if there are still free network slots available */
    60     inline bool gotFreeSlots() { return (this->localNode->getPlayerNumber() < NET_MAX_CONNECTIONS)?true:false; }
     61    inline bool gotFreeSlots() { return (this->localNode->getPlayerNumber() < SharedNetworkData::getInstance()->getMaxPlayer())?true:false; }
    6162    /** @param node node to be checked for slots @returns true if there are still free network slots available at this node */
    62     inline bool gotFreeSlots(NetworkNode* node) { return (node->getPlayerNumber() < NET_MAX_CONNECTIONS)?true:false; }
     63    inline bool gotFreeSlots(NetworkNode* node) { return (node->getPlayerNumber() < SharedNetworkData::getInstance()->getMaxPlayer())?true:false; }
    6364    PeerInfo* getFirstChoiceProxy();
    6465    PeerInfo* getSecondChoiceProxy();
    6566    /** @returns true if the next client should be reconnected to some other proxy server with more connections */
    66     inline bool reconnectNextClient() { return (this->localNode->getPlayerNumber() >= NET_MAX_CONNECTIONS)?true:false; }
     67    inline bool reconnectNextClient() { return (this->localNode->getPlayerNumber() >= SharedNetworkData::getInstance()->getMaxPlayer())?true:false; }
    6768
    6869
Note: See TracChangeset for help on using the changeset viewer.