--- deliantra/server/include/client.h 2006/12/16 18:39:26 1.6 +++ deliantra/server/include/client.h 2006/12/16 21:40:26 1.7 @@ -25,6 +25,7 @@ #define CLIENT_H #include +#include // (possibly) max. number of objects "per page" in the ground container #define NUM_LOOK_OBJECTS 50 @@ -122,16 +123,13 @@ { enum Sock_Status status; int ACC (RW, fd); - unsigned int inbuf_len; // number of bytes valid in inbuf - struct Map lastmap; - size_t faces_sent_len; /* This is the number of elements allocated in faces_sent[] */ - uint8 *faces_sent; /* This is a bitmap on sent face status */ - uint8 anims_sent[MAXANIMNUM]; + unsigned int inbuf_len; // number of bytes valid in inbuf + uint8 *faces_sent; // This is a bitmap on sent face status struct statsinfo stats; - char *ACC (RW, host); /* Which host it is connected from (ip address) */ - uint8 ACC (RW, password_fails); /* how many times the player has failed to give the right password */ - Buffer outputbuffer; /* For undeliverable data */ + char *ACC (RW, host); /* Which host it is connected from (ip address) */ + uint8 ACC (RW, password_fails); /* how many times the player has failed to give the right password */ + Buffer outputbuffer; bool ACC (RW, facecache); /* If true, client is caching images */ bool ACC (RW, sent_scroll); @@ -166,9 +164,6 @@ int ACC (RW, current_x), ACC (RW, current_y); // CF+ last/current map position char ACC (RW, version)[64]; // CF+ client name/version - // if we get an incomplete packet, this is used to hold the data. - // we add 2 byte for the header, one for the trailing 0 byte - uint8 inbuf[MAXSOCKBUF + 2 + 1]; player *ACC (RO, pl);//TODO should not be here, preferably int ACC (RW, rtt), ACC (RW, rttvar); /* round-trip time and -variance, if known */ @@ -202,6 +197,14 @@ void send_packet (const char *buf, int len); void send_packet_printf (const char *format, ...); void send_packet (packet &sl); + + // large structures at the end please + struct Map lastmap; + std::bitset anims_sent; + // if we get an incomplete packet, this is used to hold the data. + // we add 2 byte for the header, one for the trailing 0 byte + uint8 inbuf[MAXSOCKBUF + 2 + 1]; + }; #define CLIENT_SUPPORT_READABLES(__sockPtr,__type)\