Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 913 for code


Ignore:
Timestamp:
Mar 20, 2008, 4:32:20 PM (17 years ago)
Author:
scheusso
Message:

another dead bug

Location:
code/branches/network/src/network
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/network/Client.cc

    r907 r913  
    191191
    192192  void Client::processGamestate( GameStateCompressed *data){
     193    int id = data->id;
     194    COUT(5) << "received gamestate id: " << data->id << std::endl;
    193195    gamestate.pushGameState(data);
    194     COUT(5) << "received gamestate id: " << data->id << std::endl;
    195     client_connection.addPacket(pck_gen.acknowledgement(data->id));
     196    client_connection.addPacket(pck_gen.acknowledgement(id));
    196197    client_connection.sendPackets();
    197198    return;
  • code/branches/network/src/network/PacketDecoder.cc

    r912 r913  
    154154    //copy the GameStateCompressed id into the struct, which is located at second place data+sizeof( int )
    155155    //memcpy( (void*)&(currentState->id), (const void*)(data+sizeof( int )), sizeof( int ) );
    156     currentState->id = (int)*(packet->data+sizeof(int));
     156    currentState->id = *((int *)packet->data+sizeof(int));
     157    COUT(5) << "decoder: received gs id: " << currentState->id << std::endl;
    157158//     std::cout << "id: " << currentState->id << std::endl;
    158159    //copy the size of the GameStateCompressed compressed data into the new GameStateCompressed struct, located at 3th
  • code/branches/network/src/network/PacketGenerator.cc

    r790 r913  
    5050  ENetPacket* PacketGenerator::acknowledgement( int state, int reliable )
    5151  {
    52     std::cout << "generating new acknowledgement, id: " << state << std::endl;
     52    COUT(4) << "generating new acknowledgement, id: " << state << std::endl;
    5353    ack* ackreq = new ack;
    5454    ackreq->id = ACK;
     
    6363  ENetPacket* PacketGenerator::mousem( double x, double y, int reliable )
    6464  {
    65     std::cout << "generating new mouse" << std::endl;
     65    COUT(4) << "generating new mouse" << std::endl;
    6666    mouse* mousemove = new mouse;
    6767    mousemove->id = MOUSE;
     
    7777  ENetPacket* PacketGenerator::keystrike( char press, int reliable )
    7878  {
    79     std::cout << "generating new keyboard" << std::endl;
     79    COUT(4) << "generating new keyboard" << std::endl;
    8080    keyboard* key = new keyboard;
    8181    key->id = KEYBOARD;
  • code/branches/network/src/network/PacketManager.h

    r907 r913  
    44#include <string>
    55#include <enet/enet.h>
     6
     7#include "core/CoreIncludes.h"
    68
    79#include "NetworkPrereqs.h"
Note: See TracChangeset for help on using the changeset viewer.