ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/socket/image.C
(Generate patch)

Comparing deliantra/server/socket/image.C (file contents):
Revision 1.6 by root, Wed Dec 13 21:27:09 2006 UTC vs.
Revision 1.7 by root, Thu Dec 14 01:12:35 2006 UTC

312 * the caching attribute. 312 * the caching attribute.
313 * 313 *
314 */ 314 */
315 315
316void 316void
317SetFaceMode (char *buf, int len, NewSocket * ns) 317SetFaceMode (char *buf, int len, NewSocket *ns)
318{ 318{
319 char tmp[256];
320
321 int mask = (atoi (buf) & CF_FACE_CACHE), mode = (atoi (buf) & ~CF_FACE_CACHE); 319 int mask = (atoi (buf) & CF_FACE_CACHE), mode = (atoi (buf) & ~CF_FACE_CACHE);
322 320
323 if (mode == CF_FACE_NONE) 321 if (mode == CF_FACE_NONE)
324 {
325 ns->facecache = 1; 322 ns->facecache = 1;
326 }
327 else if (mode != CF_FACE_PNG) 323 else if (mode != CF_FACE_PNG)
328 { 324 {
325 SockList sl (MAXSOCKBUF);
329 sprintf (tmp, "drawinfo %d %s", NDI_RED, "Warning - send unsupported face mode. Will use Png"); 326 sl.printf ("drawinfo %d %s", NDI_RED, "Warning - send unsupported face mode. Will use Png");
330 Write_String_To_Socket (ns, tmp, strlen (tmp)); 327 ns->send_packet (sl);
331#ifdef ESRV_DEBUG
332 LOG (llevDebug, "SetFaceMode: Invalid mode from client: %d\n", mode);
333#endif
334 } 328 }
329
335 if (mask) 330 if (mask)
336 {
337 ns->facecache = 1; 331 ns->facecache = 1;
338 }
339} 332}
340 333
341/** 334/**
342 * Client has requested pixmap that it somehow missed getting. 335 * Client has requested pixmap that it somehow missed getting.
343 * This will be called often if the client is 336 * This will be called often if the client is
460 break; 453 break;
461 454
462 stop = atoi (cp); 455 stop = atoi (cp);
463 if (stop < start || *cp == '\0' || (stop - start) > 1000 || stop >= nrofpixmaps) 456 if (stop < start || *cp == '\0' || (stop - start) > 1000 || stop >= nrofpixmaps)
464 { 457 {
465 sprintf (buf, "replyinfo image_sums %d %d", start, stop); 458 sl.printf ("replyinfo image_sums %d %d", start, stop);
466 cs_write_string (ns, buf, strlen (buf)); 459 ns->send_packet (sl);
460 sl.reset ();
467 return; 461 return;
468 } 462 }
469 463
470 sl.printf ("replyinfo image_sums %d %d ", start, stop); 464 sl.printf ("replyinfo image_sums %d %d ", start, stop);
471 465

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines