--- deliantra/server/socket/image.C 2007/07/24 04:58:25 1.51
+++ deliantra/server/socket/image.C 2007/11/08 19:43:29 1.55
@@ -1,11 +1,11 @@
/*
- * This file is part of Crossfire TRT, the Roguelike Realtime MORPG.
+ * This file is part of Deliantra, the Roguelike Realtime MMORPG.
*
- * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Crossfire TRT team
+ * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
* Copyright (©) 2001,2007 Mark Wedel
* Copyright (©) 1992,2007 Frank Tore Johansen
*
- * Crossfire TRT is free software: you can redistribute it and/or modify
+ * Deliantra 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.
@@ -18,7 +18,7 @@
* 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
+ * The authors can be reached via e-mail to
*/
/** \file
@@ -173,7 +173,7 @@
if (!f)
{
- LOG (llevError, "client::send_face (%d) out of bounds??\n", facenum);
+ LOG (llevError | logBacktrace, "client::send_face (%d) out of bounds??\n", facenum);
return;
}
@@ -422,20 +422,22 @@
sl.printf ("replyinfo image_sums %d %d ", start, stop);
for (int i = start; i <= stop && i < faces.size (); i++)
- {
- ns->faces_sent[i] = true;
+ if (const faceinfo *f = face_info (i))
+ if (ns->fx_want [f->type])
+ {
+ ns->faces_sent[i] = true;
- const facedata *d = face_data (i, ns->faceset);
+ const facedata *d = f->data (ns->faceset);
- if (sl.room () < 2 + 4 + 1 + d->data.size () + 1)
- break;
+ if (sl.room () < 2 + 4 + 1 + d->data.size () + 1)
+ break;
- sl << uint16 (i)
- << uint32 (0) // checksum
- << uint8 (ns->faceset);
+ sl << uint16 (i)
+ << uint32 (0) // checksum
+ << uint8 (ns->faceset);
- print_facename (sl, *d); sl << uint8 (0);
- }
+ print_facename (sl, *d); sl << uint8 (0);
+ }
/* It would make more sense to catch this pre-emptively in the code above.
* however, if this really happens, we probably just want to cut down the
@@ -443,7 +445,7 @@
* support.
*/
//TODO: taken care of above, should simply abort or make sure the above code is correct
- if (sl.length () >= MAXSOCKBUF)
+ if (sl.length () > MAXSOCKBUF)
{
LOG (llevError, "send_image_send: buffer overrun, %d > %d\n", sl.length (), MAXSOCKBUF);
abort ();