--- deliantra/server/include/client.h 2007/05/28 21:15:56 1.51 +++ deliantra/server/include/client.h 2007/07/01 04:08:14 1.58 @@ -117,7 +117,8 @@ int ACC (RW, fd); unsigned int inbuf_len; // number of bytes valid in inbuf statsinfo stats; - int ACC (RO, active); + object_vector_index ACC (RO, active); + player_ptr ACC (RO, pl); /* The following is the setup for a ring buffer for storing output * data that the OS can't handle right away. @@ -162,7 +163,7 @@ bool ACC (RW, buggy_mapscroll); // client crashes on large mapscrolls bool ACC (RW, darkness); /* True if client wants darkness information */ bool ACC (RW, image2); /* Client wants image2/face2 commands */ - bool ACC (RW, fxix); // client implements fx and ix (face|image extended) commands + uint8_t ACC (RW, fxix); // client implements fx and ix (face|image extended) commands bool ACC (RW, update_look); /* If true, we need to send the look window */ bool ACC (RW, has_readable_type); /* If true client accept additional text information */ /* used to arrange text in books, scrolls, or scripted dialogs */ @@ -189,7 +190,7 @@ shstr ACC (RW, version); // CF+ client name/version uint8 ACC (RW, faceset); // CF+ selected faceset - player_ptr ACC (RO, pl); + tstamp ACC (RW, last_send); // last data send on socket. int ACC (RW, rtt), ACC (RW, rttvar); /* round-trip time and -variance, if known */ @@ -198,11 +199,14 @@ faceidx ACC (RW, scrub_idx); // which face to send next int ACC (RW, bg_scrub); // how many ticks till the next background face send - faceidx partial_face; - uint32 partial_face_ofs; // if != 0, need to send remaining bytes of partial_face - std::vector > askface; // which faces have been requested by the client + struct ixsend { + int16_t pri; // unused + faceidx idx; + uint32_t ofs; // if != 0, need to send remaining bytes of partial_face + }; + std::vector > ixface; // which faces to send to the client using ix - std::vector > fxface; // which faces to send using fx + std::vector > fxface; // which faces to send using fx MTH void flush_fx (); // send fx if required void do_destroy (); @@ -262,7 +266,7 @@ MTH void send_image (faceidx facenum); MTH void send_faces (object *ob); MTH void send_animation (short anim_num); - MTH void send_msg (int color, const char *type, const char *msg); + void send_msg (int color, const char *type, const char *msg); // called when something under the player changes MTH void floorbox_update () { update_look = 1; } @@ -315,7 +319,7 @@ #define VERSION_CS 1023 /* version >= 1023 understand setup cmd */ #define VERSION_SC 1026 //#define VERSION_SC 1027 // requestinfo image_info and image_sums, makes extending faces on the fly impossible -#define VERSION_INFO "Crossfire+ Server" +#define VERSION_INFO "Crossfire TRT Server" typedef object_vector sockvec; @@ -323,7 +327,7 @@ #define for_all_clients(var) \ for (int _i = 0; _i < clients.size (); ++_i) \ - declvar (client *, var, clients [_i]) + statementvar (client *, var, clients [_i]) #endif