Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 9, 2008, 4:31:34 PM (16 years ago)
Author:
scheusso
Message:

merged network branch back into trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/network/Client.cc

    r1735 r1751  
    6161    isSynched_=false;
    6262    gameStateFailure_=false;
     63    isServer_ = false;
    6364  }
    6465
     
    7273    isSynched_=false;
    7374    gameStateFailure_=false;
     75    isServer_ = false;
    7476  }
    7577
     
    8385    isSynched_=false;
    8486    gameStateFailure_=false;
     87    isServer_ = false;
    8588  }
    8689
     
    151154    if(client_connection.isConnected() && isSynched_){
    152155      COUT(4) << "popping partial gamestate: " << std::endl;
    153       /*packet::Gamestate *gs = gamestate.getGamestate();
     156      packet::Gamestate *gs = gamestate.getGamestate();
    154157      if(gs){
    155158        COUT(4) << "client tick: sending gs " << gs << std::endl;
     
    157160          COUT(3) << "Problem adding partial gamestate to queue" << std::endl;
    158161        // gs gets automatically deleted by enet callback
    159       }*/
     162      }
    160163    }
    161164    ENetEvent *event;
     
    168171    }
    169172    int gameStateID = gamestate.processGamestates();
    170     /*if(gameStateID==GAMESTATEID_INITIAL)
     173    if(gameStateID==GAMESTATEID_INITIAL)
    171174      if(gameStateFailure_){
    172         packet::Acknowledgement ack(GAMESTATEID_INITIAL, 0);
    173         if(!ack.send())
     175        packet::Acknowledgement *ack = new packet::Acknowledgement(GAMESTATEID_INITIAL, 0);
     176        if(!ack->send())
    174177          COUT(3) << "could not (negatively) ack gamestate" << std::endl;
    175178        else
     
    183186        isSynched_=true;
    184187      gameStateFailure_=false;
    185       packet::Acknowledgement ack(gameStateID, 0);
    186       if(!ack.send())
     188      packet::Acknowledgement *ack = new packet::Acknowledgement(gameStateID, 0);
     189      if(!ack->send())
    187190        COUT(3) << "could not ack gamestate" << std::endl;
    188     }*/// otherwise we had no gamestate to load
     191    }// otherwise we had no gamestate to load
    189192    gamestate.cleanup();
    190193    return;
Note: See TracChangeset for help on using the changeset viewer.