Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 607


Ignore:
Timestamp:
Dec 17, 2007, 11:25:46 PM (17 years ago)
Author:
dumenim
Message:

still some problem

File:
1 edited

Legend:

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

    r606 r607  
    134134   */
    135135  bool Server::sendGameState(){
    136     /*for(ClientInformation *temp = clients->next(); temp!=0; temp=temp->next()){
    137       connection->addPacket(packet_gen.gstate(&(gamestates->popGameState(temp->getID()))),temp->getID());
     136    std::cout << "starting gamestate" << std::endl;
     137    ClientInformation *temp = clients;
     138    bool added=false;
     139    while(temp!=NULL){
     140      if(temp->head){
     141        temp=temp->next();
     142        continue;
     143      }
     144      std::cout << "doing gamestate" << std::endl;
     145      int id = temp->getID();
     146      GameStateCompressed *gs = &(gamestates->popGameState(id));
     147      std::cout << "adding gamestate" << std::endl;
     148      connection->addPacket(packet_gen.gstate(gs), id);
    138149      std::cout << "added gamestate" << std::endl;
     150      added=true;
     151      temp=temp->next();
    139152    }
    140     return connection->sendPackets();*/
    141     return true;
     153    if(added)
     154      return connection->sendPackets();
     155    else return false;
     156    //return true;
    142157  }
    143158 
Note: See TracChangeset for help on using the changeset viewer.