--- deliantra/server/include/client.h 2007/06/24 00:33:54 1.54
+++ deliantra/server/include/client.h 2007/07/12 08:40:14 1.60
@@ -1,23 +1,22 @@
/*
- * This file is part of Crossfire TRT, the Multiplayer Online Role Playing Game.
+ * This file is part of Crossfire TRT, the Roguelike Realtime MORPG.
*
* Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Crossfire TRT team
* Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team
* Copyright (©) 1992,2007 Frank Tore Johansen
*
- * Crossfire TRT is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
+ * Crossfire TRT is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License along
- * with Crossfire TRT; if not, write to the Free Software Foundation, Inc. 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
* The authors can be reached via e-mail to
*/
@@ -163,7 +162,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 */
@@ -199,11 +198,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 ();
@@ -259,11 +261,21 @@
void send_packet (packet &sl);
void send_drawinfo (const char *msg, int flags = NDI_BLACK);
+
+ MTH bool must_send_face (faceidx facenum)
+ {
+ if (faces_sent[facenum])
+ return false;
+
+ faces_sent[facenum] = true;
+ return true;
+ }
+
MTH void send_face (faceidx facenum);
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; }
@@ -316,7 +328,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;