Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 27, 2015, 10:45:56 AM (9 years ago)
Author:
maxima
Message:

multiplayer branch merged to presentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentationFS15/src/libraries/network/Server.cc

    r9667 r10497  
    7777    this->timeSinceLastUpdate_=0;
    7878  }
    79 
     79/*
     80  Server::Server(int port, const std::string name)
     81  {
     82    this->setPort( port );
     83    this->timeSinceLastUpdate_=0;
     84    this->serverName_=name;
     85  }*/
    8086  /**
    8187  * Constructor
     
    108114    /* make discoverable on LAN */
    109115    LANDiscoverable::setActivity(true);
     116    LANDiscoverable::updateClientNumber(0);
    110117
    111118    /* make discoverable on WAN */
    112119    WANDiscoverable::setActivity(true);
     120    WANDiscoverable::updateClientNumber(0);
    113121
    114122    /* done */
     
    283291    // inform all the listeners
    284292    this->clientIDs_.push_back(peerID);
     293    WANDiscoverable::updateClientNumber(this->clientIDs_.size());
     294    LANDiscoverable::updateClientNumber(this->clientIDs_.size());
     295
    285296    ClientConnectionListener::broadcastClientConnected(peerID);
    286297    GamestateManager::addPeer(peerID);
     
    289300
    290301    orxout(internal_info, context::network) << "Server: added client id: " << peerID << endl;
     302
    291303    createClient(peerID);
    292304}
     
    309321    }
    310322  }
     323  WANDiscoverable::updateClientNumber(this->clientIDs_.size());
     324  LANDiscoverable::updateClientNumber(this->clientIDs_.size());
     325
    311326  ClientConnectionListener::broadcastClientDisconnected(peerID);
    312327  GamestateManager::removePeer(peerID);
Note: See TracChangeset for help on using the changeset viewer.