Changeset 6116 in orxonox.OLD for branches/network/src/lib/network/handshake.cc
- Timestamp:
- Dec 14, 2005, 11:19:11 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/network/handshake.cc
r6115 r6116 22 22 #include "handshake.h" 23 23 24 Handshake::Handshake( bool server, int clientId, int entityManagerId )24 Handshake::Handshake( bool server, int clientId, int networkGameManagerId ) 25 25 { 26 26 /* set the class id for the base object */ 27 27 this->setClassID(CL_HANDSHAKE, "Handshake"); 28 28 29 if ( clientId > 255 )30 {31 PRINTF(1)("clientId is too big for type byte (%d)! connection to client %d will not work!", clientId, clientId);32 }33 34 if ( entityManagerId > 255 )35 {36 PRINTF(1)("entityManagerId is too big for type byte (%d)! connection to client %d will not work!", entityManagerId, clientId);37 }38 39 29 this->setIsServer(server); 40 30 this->clientId = clientId; 41 this-> entityManagerId = entityManagerId;31 this->networkGameManagerId = networkGameManagerId; 42 32 this->state = 0; 43 33 this->isOk = false; … … 110 100 this->isOk = true; 111 101 this->newHostId = data[0]; 112 this->new EntityManagerId = data[1];102 this->newNetworkGameManagerId = data[1]; 113 103 114 104 if ( newHostId == 0 ) … … 120 110 else 121 111 { 122 PRINTF(0)("got my hostID: %d \n", newHostId);112 PRINTF(0)("got my hostID: %d and networkGameManagerId: %d\n", newHostId, newNetworkGameManagerId); 123 113 } 124 114 return; … … 189 179 //memcpy(data, &clientId, 4); 190 180 data[0] = (byte)clientId; 191 data[1] = (byte) entityManagerId;181 data[1] = (byte)networkGameManagerId; 192 182 } 193 183 *reciever = clientId;
Note: See TracChangeset
for help on using the changeset viewer.