Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 23, 2015, 9:47:30 PM (9 years ago)
Author:
frovelli
Message:

Transmit client count in LAN by evil hack

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/multiplayerFS15/src/libraries/network/packet/ServerInformation.cc

    r10434 r10456  
    7373    void ServerInformation::send(ENetPeer* peer)
    7474    {
    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);
    7677      uint8_t* temp = new uint8_t[size];
    7778      uint8_t* temp2 = temp;
    7879      saveAndIncrease((char*&)LAN_DISCOVERY_ACK, temp2);
    79       saveAndIncrease(this->serverName_, temp2);
     80      saveAndIncrease(payload, temp2);
    8081      ENetPacket* packet = enet_packet_create( temp, size, 0 );
    8182      enet_peer_send(peer, 0, packet);
Note: See TracChangeset for help on using the changeset viewer.