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/Client.cc

    r8788 r8807  
    118118  bool Client::processChat(const std::string& message, unsigned int playerID)
    119119  {
    120 //    COUT(1) << "Player " << playerID << ": " << message << std::endl;
     120//    orxout(message) << "Player " << playerID << ": " << message << endl;
    121121    return true;
    122122  }
     
    124124  void Client::printRTT()
    125125  {
    126     COUT(0) << "Round trip time to server is " << ClientConnection::getRTT() << " ms" << endl;
     126    orxout(message) << "Round trip time to server is " << ClientConnection::getRTT() << " ms" << endl;
    127127  }
    128128
     
    150150    {
    151151      timeSinceLastUpdate_ -= static_cast<unsigned int>( timeSinceLastUpdate_ / NETWORK_PERIOD ) * NETWORK_PERIOD;
    152       //     COUT(3) << '.';
    153152      if ( isConnected() && isSynched_ )
    154153      {
    155         COUT(4) << "popping partial gamestate: " << std::endl;
     154        orxout(verbose, context::network) << "popping partial gamestate: " << endl;
    156155//         packet::Gamestate *gs = GamestateClient::getGamestate();
    157156        if( GamestateManager::update() )
     
    166165        //assert(gs); <--- there might be the case that no data has to be sent, so its commented out now
    167166//         if(gs){
    168 //           COUT(4) << "client tick: sending gs " << gs << std::endl;
     167//           orxout(verbose, context::network) << "client tick: sending gs " << gs << endl;
    169168//           if( !gs->send() )
    170 //             COUT(2) << "Problem adding partial gamestate to queue" << std::endl;
     169//             orxout(internal_warning, context::network) << "Problem adding partial gamestate to queue" << endl;
    171170//         // gs gets automatically deleted by enet callback
    172171//         }
Note: See TracChangeset for help on using the changeset viewer.