Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 11, 2008, 5:06:24 PM (16 years ago)
Author:
scheusso
Message:

sync frequencies do work now

File:
1 edited

Legend:

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

    r1767 r1769  
    4545#include "core/ConsoleCommand.h"
    4646#include "packet/Packet.h"
    47 #include "packet/Acknowledgement.h"
     47// #include "packet/Acknowledgement.h"
    4848
    4949namespace network
     
    166166      assert(packet->process());
    167167    }
    168     int gameStateID = gamestate.processGamestates();
    169     if(gameStateID==GAMESTATEID_INITIAL)
    170       if(gameStateFailure_){
    171         packet::Acknowledgement *ack = new packet::Acknowledgement((unsigned int)GAMESTATEID_INITIAL, 0);
    172         if(!ack->send())
    173           COUT(3) << "could not (negatively) ack gamestate" << std::endl;
    174         else
    175           COUT(4) << "negatively acked a gamestate" << std::endl;
    176         }
    177       else
    178         gameStateFailure_=true;
    179     else if(gameStateID!=0){
    180       // ack gamestate and set synched
     168    if(gamestate.processGamestates())
     169    {
    181170      if(!isSynched_)
    182171        isSynched_=true;
    183       gameStateFailure_=false;
    184       packet::Acknowledgement *ack = new packet::Acknowledgement(gameStateID, 0);
    185       if(!ack->send())
    186         COUT(3) << "could not ack gamestate" << std::endl;
    187     }// otherwise we had no gamestate to load
     172    }else
     173      COUT(3) << "gamestate has not been processed sucessfully" << std::endl;
    188174    gamestate.cleanup();
    189175    return;
Note: See TracChangeset for help on using the changeset viewer.