Changeset 3257 for code/branches/core4/src/network/packet/Chat.cc
- Timestamp:
- Jun 30, 2009, 3:14:45 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core4/src/network/packet/Chat.cc
r3214 r3257 38 38 #define PACKET_FLAGS_CHAT PacketFlag::Reliable 39 39 #define _PACKETID 0 40 const int _PLAYERID = _PACKETID + sizeof( ENUM::Type);40 const int _PLAYERID = _PACKETID + sizeof(Type::Value); 41 41 #define _MESSAGELENGTH _PLAYERID + sizeof(uint32_t) 42 42 #define _MESSAGE _MESSAGELENGTH + sizeof(uint32_t) … … 48 48 messageLength_ = message.length()+1; 49 49 data_=new unsigned char[ getSize() ]; 50 *( ENUM::Type *)(data_ + _PACKETID ) = ENUM::Chat;50 *(Type::Value *)(data_ + _PACKETID ) = Type::Chat; 51 51 *(unsigned int *)(data_ + _PLAYERID ) = playerID; 52 52 *(unsigned int *)(data_ + _MESSAGELENGTH ) = messageLength_;
Note: See TracChangeset
for help on using the changeset viewer.