Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 1, 2009, 9:47:34 AM (16 years ago)
Author:
scheusso
Message:

this is another commit for testing purpose
still trying to get network function calls to work (first success)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/netp2/src/network/packet/Packet.cc

    r2937 r2944  
    3939
    4040#include "Acknowledgement.h"
     41#include "DeleteObjects.h"
    4142#include "Chat.h"
    4243#include "ClassID.h"
     44#include "FunctionCalls.h"
     45#include "FunctionIDs.h"
    4346#include "Gamestate.h"
    4447#include "Welcome.h"
    45 #include "DeleteObjects.h"
    4648#include "network/Host.h"
    4749#include "core/CoreIncludes.h"
     
    172174  unsigned int clientID = ClientInformation::findClient(&peer->address)->getID();
    173175  Packet *p = 0;
    174   COUT(5) << "packet type: " << *(ENUM::Type *)&data[_PACKETID] << std::endl;
     176  COUT(6) << "packet type: " << *(ENUM::Type *)&data[_PACKETID] << std::endl;
    175177  switch( *(ENUM::Type *)(data + _PACKETID) )
    176178  {
    177179    case ENUM::Acknowledgement:
    178       COUT(4) << "ack" << std::endl;
     180      COUT(5) << "ack" << std::endl;
    179181      p = new Acknowledgement( data, clientID );
    180182      break;
    181183    case ENUM::Chat:
    182       COUT(4) << "chat" << std::endl;
     184      COUT(5) << "chat" << std::endl;
    183185      p = new Chat( data, clientID );
    184186      break;
    185187    case ENUM::ClassID:
    186       COUT(4) << "classid" << std::endl;
     188      COUT(5) << "classid" << std::endl;
    187189      p = new ClassID( data, clientID );
    188190      break;
    189191    case ENUM::Gamestate:
    190       COUT(4) << "gamestate" << std::endl;
     192      COUT(5) << "gamestate" << std::endl;
    191193      // TODO: remove brackets
    192194      p = new Gamestate( data, clientID );
    193195      break;
    194196    case ENUM::Welcome:
    195       COUT(4) << "welcome" << std::endl;
     197      COUT(5) << "welcome" << std::endl;
    196198      p = new Welcome( data, clientID );
    197199      break;
    198200    case ENUM::DeleteObjects:
    199       COUT(4) << "deleteobjects" << std::endl;
     201      COUT(5) << "deleteobjects" << std::endl;
    200202      p = new DeleteObjects( data, clientID );
     203      break;
     204    case ENUM::FunctionCalls:
     205      COUT(5) << "functionCalls" << std::endl;
     206      p = new FunctionCalls( data, clientID );
     207      break;
     208    case ENUM::FunctionIDs:
     209      COUT(5) << "functionIDs" << std::endl;
     210      p = new FunctionIDs( data, clientID );
    201211      break;
    202212    default:
Note: See TracChangeset for help on using the changeset viewer.