Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 12, 2006, 5:10:09 PM (18 years ago)
Author:
patrick
Message:

more framework switching

File:
1 edited

Legend:

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

    r6695 r9257  
    88
    99#include "base_object.h"
     10#include "netdefs.h"
    1011
    1112
     
    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; }
     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; }
    3338
    3439    /** @returns the hostID of the node */
     
    4954  private:
    5055    int                             newUniqueID;             //!< next uniqueID
    51     bool                            bGameServer;             //!< true if it is a server
     56    int                             nodeType;                //!< saves the node type here
     57
    5258    int                             hostID;                  //!< The Host-ID of the Manager
    5359    NetworkStream*                  defaultSyncStream;       //!< default synchronize NetworkStream
Note: See TracChangeset for help on using the changeset viewer.