Changeset 1955
- Timestamp:
- Oct 19, 2008, 10:12:50 PM (16 years ago)
- Location:
- code/branches/objecthierarchy/src/network
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/network/ClientInformation.cc
r1953 r1955 137 137 } 138 138 139 int ClientInformation::getID() {139 unsigned int ClientInformation::getID() { 140 140 if(!this) 141 141 return CLIENTID_UNKNOWN; … … 169 169 } 170 170 171 int ClientInformation::getGamestateID() {171 unsigned int ClientInformation::getGamestateID() { 172 172 if(this) 173 173 return gamestateID_; … … 176 176 } 177 177 178 int ClientInformation::getPartialGamestateID() {178 unsigned int ClientInformation::getPartialGamestateID() { 179 179 if(this) 180 180 return partialGamestateID_; … … 196 196 } 197 197 198 bool ClientInformation::removeClient( int clientID) {198 bool ClientInformation::removeClient(unsigned int clientID) { 199 199 if((unsigned int)clientID==CLIENTID_UNKNOWN) 200 200 return false; … … 229 229 * @return pointer to the last element in the list or 0 if the search was unsuccessfull 230 230 */ 231 ClientInformation *ClientInformation::findClient( int clientID, bool look_backwards) {231 ClientInformation *ClientInformation::findClient(unsigned int clientID, bool look_backwards) { 232 232 ClientInformation *temp = head_; 233 233 while(temp!=0 && temp->getID()!=clientID){ -
code/branches/objecthierarchy/src/network/ClientInformation.h
r1953 r1955 77 77 // get functions 78 78 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(); 82 82 ENetPeer *getPeer(); 83 83 … … 88 88 enet_uint32 getPacketLoss(); 89 89 90 static bool removeClient( int clientID);90 static bool removeClient(unsigned int clientID); 91 91 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); 93 93 static ClientInformation *findClient(ENetAddress *address, bool look_backwards=false); 94 94 static ClientInformation *getBegin(){return head_;} … … 110 110 //actual information: 111 111 ENetPeer *peer_; 112 int clientID_;113 int gamestateID_;114 int partialGamestateID_;112 unsigned int clientID_; 113 unsigned int gamestateID_; 114 unsigned int partialGamestateID_; 115 115 unsigned int ShipID_; // this is the unique objectID 116 116 bool synched_;
Note: See TracChangeset
for help on using the changeset viewer.