Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 605 for code/branches/FICN


Ignore:
Timestamp:
Dec 17, 2007, 10:56:01 PM (17 years ago)
Author:
scheusso
Message:

added gamestatesending

Location:
code/branches/FICN/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/network/ClientConnection.cc

    r514 r605  
    147147    //main loop
    148148    while(!quit){
     149      //std::cout << "connection loop" << std::endl;
    149150      if(enet_host_service(client, &event, NETWORK_WAIT_TIMEOUT)<0){
    150151        // we should never reach this point
     
    212213
    213214  bool ClientConnection::processData(ENetEvent *event){
     215    std::cout << "got packet, pushing to queue" << std::endl;
    214216    // just add packet to the buffer
    215217    // this can be extended with some preprocessing
  • code/branches/FICN/src/network/ClientConnection.h

    r369 r605  
    2828#define NETWORK_PORT 55556
    2929#define NETWORK_CLIENT_MAX_CONNECTIONS 5
    30 #define NETWORK_WAIT_TIMEOUT 5000
     30#define NETWORK_WAIT_TIMEOUT 5
    3131#define NETWORK_SEND_WAIT 5
    3232#define NETWORK_CLIENT_CHANNELS 2
  • code/branches/FICN/src/network/NetworkFrameListener.h

    r601 r605  
    3636private:
    3737  bool frameStarted(const Ogre::FrameEvent &evt){
    38     std::cout << "framelistener" << std::endl;
     38    //std::cout << "framelistener" << std::endl;
    3939    client_g->tick(evt.timeSinceLastFrame);
    4040    return FrameListener::frameStarted(evt);
  • code/branches/FICN/src/network/Server.cc

    r604 r605  
    134134   */
    135135  bool Server::sendGameState(){
     136    for(ClientInformation *temp = clients; temp!=0; temp=temp->next()){
     137      connection->addPacket(packet_gen.gstate(&(gamestates->popGameState(temp->getID()))),temp->getID());
     138    }
    136139    return true;
    137140  }
  • code/branches/FICN/src/orxonox/orxonox.cc

    r604 r605  
    162162        //if(mKeyboard->isKeyDown(OIS::KC_ESCAPE))
    163163          //cout << "maximal MouseX: " << maxMouseX << "\tminMouseX: " << minMouseX << endl;
    164         if(mode_==PRESENTATION){
     164        if(mode_==PRESENTATION)
    165165          server_g->tick(evt.timeSinceLastFrame);
    166           std::cout << "tick server" << std::endl;
    167         }
     166        else if(mode_==CLIENT)
     167          client_g->tick(evt.timeSinceLastFrame);
    168168        usleep(10);
    169169        return !mKeyboard->isKeyDown(OIS::KC_ESCAPE);
Note: See TracChangeset for help on using the changeset viewer.