Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 20, 2006, 11:43:27 AM (18 years ago)
Author:
bensch
Message:

orxonox/proxy: merged the proxy.old back again, and it seems to work.

Merged with command
svn merge -r9247:HEAD https://svn.orxonox.net/orxonox/branches/proxy.old .

no conflicts

File:
1 edited

Legend:

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

    r6695 r9347  
    88
    99#include "base_object.h"
     10#include "netdefs.h"
     11#include "proxy/proxy_settings.h"
    1012
    1113
    1214class NetworkStream;
    1315class Synchronizeable;
    14 template<typename>
    15     class tList;
     16
    1617
    1718/* and here is the class itsself*/
     
    2526
    2627    /** @returns the next uniqueID free for an object */
    27     inline int getNewUniqueID() { return ( this->bGameServer)?this->newUniqueID++:-1; }
     28    inline int getNewUniqueID() { return ( this->nodeType != NET_CLIENT)?this->newUniqueID++:-1; }
    2829
    29     /** @returns true is this node is a game server */
    30     inline bool isGameServer() { return this->bGameServer; }
     30    /** @returns true is this node is a master server */
     31    inline bool isMasterServer() { return this->nodeType == NET_MASTER_SERVER; }
     32    /** @returns true is this node is a proxy server */
     33    inline bool isProxyServer() { return this->nodeType == NET_PROXY_SERVER_ACTIVE; }
     34    /** @returns true is this node is a client*/
     35    inline bool isClient() { return this->nodeType == NET_CLIENT; }
    3136    /** sets the game server flag @param bGameServer true if it is a game server */
    32     inline void setGameServer(bool bGameServer) { this->bGameServer = bGameServer; }
     37    inline void setNodeType(int nodeType) { this->nodeType = nodeType; }
     38
     39    /** @returns the maximum number of players for this server */
     40    inline int getMaxPlayer() { return ProxySettings::getInstance()->getMaxPlayer(); }
    3341
    3442    /** @returns the hostID of the node */
     
    4957  private:
    5058    int                             newUniqueID;             //!< next uniqueID
    51     bool                            bGameServer;             //!< true if it is a server
     59    int                             nodeType;                //!< saves the node type here
     60
    5261    int                             hostID;                  //!< The Host-ID of the Manager
    5362    NetworkStream*                  defaultSyncStream;       //!< default synchronize NetworkStream
Note: See TracChangeset for help on using the changeset viewer.