Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 12, 2008, 5:36:57 PM (16 years ago)
Author:
scheusso
Message:

we have a new gamestate concept now: dont transmit synchronisable header of objects, that dont get updated that tick. transmit objectids of deleted objects to delete them on the client too

File:
1 edited

Legend:

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

    r1763 r1775  
    4242#include "Gamestate.h"
    4343#include "Welcome.h"
     44#include "DeleteObjects.h"
    4445#include "network/Host.h"
    4546#include "core/CoreIncludes.h"
     
    141142  unsigned int clientID = ClientInformation::findClient(&peer->address)->getID();
    142143  Packet *p;
    143   COUT(3) << "packet type: " << *(ENUM::Type *)&data[_PACKETID] << std::endl;
     144  COUT(5) << "packet type: " << *(ENUM::Type *)&data[_PACKETID] << std::endl;
    144145  switch( *(ENUM::Type *)(data + _PACKETID) )
    145146  {
    146147    case ENUM::Acknowledgement:
    147       COUT(3) << "ack" << std::endl;
     148      COUT(4) << "ack" << std::endl;
    148149      p = new Acknowledgement( data, clientID );
    149150      break;
    150151    case ENUM::Chat:
    151       COUT(3) << "chat" << std::endl;
     152      COUT(4) << "chat" << std::endl;
    152153      p = new Chat( data, clientID );
    153154      break;
    154155    case ENUM::ClassID:
    155       COUT(3) << "classid" << std::endl;
     156      COUT(4) << "classid" << std::endl;
    156157      p = new ClassID( data, clientID );
    157158      break;
    158159    case ENUM::Gamestate:
    159       COUT(3) << "gamestate" << std::endl;
     160      COUT(4) << "gamestate" << std::endl;
    160161      // TODO: remove brackets
    161162      p = new Gamestate( data, clientID );
    162163      break;
    163164    case ENUM::Welcome:
    164       COUT(3) << "welcome" << std::endl;
     165      COUT(4) << "welcome" << std::endl;
    165166      p = new Welcome( data, clientID );
     167      break;
     168    case ENUM::DeleteObjects:
     169      COUT(4) << "deleteobjects" << std::endl;
     170      p = new DeleteObjects( data, clientID );
    166171      break;
    167172    default:
Note: See TracChangeset for help on using the changeset viewer.