Changeset 2316 for code/branches
- Timestamp:
- Dec 3, 2008, 2:07:32 PM (16 years ago)
- Location:
- code/branches/network64/src/network
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network64/src/network/packet/Welcome.cc
r2211 r2316 43 43 #define _CLIENTID _PACKETID + sizeof(ENUM::Type) 44 44 #define _SHIPID _CLIENTID + sizeof(uint32_t) 45 #define _ENDIANTEST _SHIPID + sizeof(uint32_t) 45 46 46 47 Welcome::Welcome( unsigned int clientID, unsigned int shipID ) … … 52 53 assert(data_); 53 54 *(packet::ENUM::Type *)(data_ + _PACKETID ) = packet::ENUM::Welcome; 54 *(uint32_t *)&data_[ _CLIENTID ] = clientID; 55 *(uint32_t *)&data_[ _SHIPID ] = shipID; 55 *(uint32_t *)(data_ + _CLIENTID ) = clientID; 56 *(uint32_t *)(data_ + _SHIPID ) = shipID; 57 *(uint32_t *)(data_ + _ENDIANTEST ) = 0xFEDC4321; 56 58 } 57 59 … … 70 72 71 73 unsigned int Welcome::getSize() const{ 72 return sizeof(packet::ENUM::Type) + 2*sizeof(uint32_t);74 return sizeof(packet::ENUM::Type) + 3*sizeof(uint32_t); 73 75 } 74 76 … … 77 79 clientID = *(uint32_t *)&data_[ _CLIENTID ]; 78 80 shipID = *(uint32_t *)&data_[ _SHIPID ]; 81 assert(*(uint32_t *)(data_ + _ENDIANTEST ) == 0xFEDC4321); 79 82 Host::setClientID(clientID); 80 83 Host::setShipID(shipID); -
code/branches/network64/src/network/synchronisable/Synchronisable.cc
r2309 r2316 303 303 //std::cout << "inside getData" << std::endl; 304 304 uint32_t tempsize = 0; 305 if (classID==0)305 if (this->classID==0) 306 306 COUT(3) << "classid 0 " << this->getIdentifier()->getName() << std::endl; 307 307
Note: See TracChangeset
for help on using the changeset viewer.