- Timestamp:
- May 23, 2015, 9:47:30 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/multiplayerFS15/src/libraries/network/packet/ServerInformation.cc
r10434 r10456 73 73 void ServerInformation::send(ENetPeer* peer) 74 74 { 75 uint32_t size = returnSize((char*&)LAN_DISCOVERY_ACK) + returnSize(this->serverName_); 75 std::string payload = this->serverName_ + Ogre::StringConverter::toString(this->clientNumber_); 76 uint32_t size = returnSize((char*&)LAN_DISCOVERY_ACK) + returnSize(payload); 76 77 uint8_t* temp = new uint8_t[size]; 77 78 uint8_t* temp2 = temp; 78 79 saveAndIncrease((char*&)LAN_DISCOVERY_ACK, temp2); 79 saveAndIncrease( this->serverName_, temp2);80 saveAndIncrease(payload, temp2); 80 81 ENetPacket* packet = enet_packet_create( temp, size, 0 ); 81 82 enet_peer_send(peer, 0, packet);
Note: See TracChangeset
for help on using the changeset viewer.