Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 31, 2011, 9:09:23 PM (14 years ago)
Author:
landauf
Message:

Replaced COUT with orxout in network library. Tried to set levels and contexts in a more or less useful way, but not really optimized. Used contexts network, packets, and master_server.
Please use endl instead of \n in the future (@smerkli) ;)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/output/src/libraries/network/GamestateManager.cc

    r8788 r8807  
    128128    if( !this->sendPacket(ack))
    129129    {
    130       COUT(3) << "could not ack gamestate: " << gamestateID << std::endl;
     130      orxout(internal_warning, context::network) << "could not ack gamestate: " << gamestateID << endl;
    131131      return false;
    132132    }
    133133    else
    134134    {
    135       COUT(5) << "acked a gamestate: " << gamestateID << std::endl;
     135      orxout(verbose_more, context::network) << "acked a gamestate: " << gamestateID << endl;
    136136      return true;
    137137    }
     
    182182      if( !peerIt->second.isSynched )
    183183      {
    184         COUT(5) << "Server: not sending gamestate" << std::endl;
     184        orxout(verbose_more, context::network) << "Server: not sending gamestate" << endl;
    185185        continue;
    186186      }
    187       COUT(5) << "client id: " << peerIt->first << std::endl;
    188       COUT(5) << "Server: doing gamestate gamestate preparation" << std::endl;
     187      orxout(verbose_more, context::network) << "client id: " << peerIt->first << endl;
     188      orxout(verbose_more, context::network) << "Server: doing gamestate gamestate preparation" << endl;
    189189      int peerID = peerIt->first; //get client id
    190190
     
    256256//     OrxVerify(gs->compressData(), "");
    257257    clock.capture();
    258     COUT(5) << "diff and compress time: " << clock.getDeltaTime() << endl;
    259 //     COUT(5) << "sending gamestate with id " << gs->getID();
     258    orxout(verbose_more, context::network) << "diff and compress time: " << clock.getDeltaTime() << endl;
     259//     orxout(verbose_more, context::network) << "sending gamestate with id " << gs->getID();
    260260//     if(gamestate->isDiffed())
    261 //       COUT(5) << " and baseid " << gs->getBaseID() << endl;
     261//       orxout(verbose_more, context::network) << " and baseid " << gs->getBaseID() << endl;
    262262//     else
    263 //       COUT(5) << endl;
     263//       orxout(verbose_more, context::network) << endl;
    264264    gs->setPeerID(peerID);
    265265    destgamestate = gs;
     
    291291    if( gamestateID <= curid && curid != GAMESTATEID_INITIAL )
    292292        return true;
    293 COUT(4) << "acking gamestate " << gamestateID << " for peerID: " << peerID << " curid: " << curid << std::endl;
     293orxout(verbose, context::network) << "acking gamestate " << gamestateID << " for peerID: " << peerID << " curid: " << curid << endl;
    294294    std::map<uint32_t, packet::Gamestate*>::iterator it2;
    295295    for( it2=it->second.gamestates.begin(); it2!=it->second.gamestates.end(); )
Note: See TracChangeset for help on using the changeset viewer.