Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1955


Ignore:
Timestamp:
Oct 19, 2008, 10:12:50 PM (16 years ago)
Author:
scheusso
Message:

ClientInformation is now consisten with other classes regarding clientid
and gamestateid

Location:
code/branches/objecthierarchy/src/network
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/network/ClientInformation.cc

    r1953 r1955  
    137137  }
    138138
    139   int ClientInformation::getID() {
     139  unsigned int ClientInformation::getID() {
    140140    if(!this)
    141141      return CLIENTID_UNKNOWN;
     
    169169  }
    170170
    171   int ClientInformation::getGamestateID() {
     171  unsigned int ClientInformation::getGamestateID() {
    172172    if(this)
    173173      return gamestateID_;
     
    176176  }
    177177
    178   int ClientInformation::getPartialGamestateID() {
     178  unsigned int ClientInformation::getPartialGamestateID() {
    179179    if(this)
    180180      return partialGamestateID_;
     
    196196  }
    197197
    198   bool ClientInformation::removeClient(int clientID) {
     198  bool ClientInformation::removeClient(unsigned int clientID) {
    199199    if((unsigned int)clientID==CLIENTID_UNKNOWN)
    200200      return false;
     
    229229  * @return pointer to the last element in the list or 0 if the search was unsuccessfull
    230230  */
    231   ClientInformation *ClientInformation::findClient(int clientID, bool look_backwards) {
     231  ClientInformation *ClientInformation::findClient(unsigned int clientID, bool look_backwards) {
    232232    ClientInformation *temp = head_;
    233233    while(temp!=0 && temp->getID()!=clientID){
  • code/branches/objecthierarchy/src/network/ClientInformation.h

    r1953 r1955  
    7777    // get functions
    7878    inline unsigned int getShipID(){return ShipID_;}
    79     int getID();
    80     int getGamestateID();
    81     int getPartialGamestateID();
     79    unsigned int getID();
     80    unsigned int getGamestateID();
     81    unsigned int getPartialGamestateID();
    8282    ENetPeer *getPeer();
    8383
     
    8888    enet_uint32 getPacketLoss();
    8989
    90     static bool removeClient(int clientID);
     90    static bool removeClient(unsigned int clientID);
    9191    static bool removeClient(ENetPeer *peer);
    92     static ClientInformation *findClient(int clientID, bool look_backwards=false);
     92    static ClientInformation *findClient(unsigned int clientID, bool look_backwards=false);
    9393    static ClientInformation *findClient(ENetAddress *address, bool look_backwards=false);
    9494    static ClientInformation *getBegin(){return head_;}
     
    110110    //actual information:
    111111    ENetPeer *peer_;
    112     int clientID_;
    113     int gamestateID_;
    114     int partialGamestateID_;
     112    unsigned int clientID_;
     113    unsigned int gamestateID_;
     114    unsigned int partialGamestateID_;
    115115    unsigned int ShipID_;   // this is the unique objectID
    116116    bool synched_;
Note: See TracChangeset for help on using the changeset viewer.