--- deliantra/server/socket/image.C 2007/03/14 18:25:18 1.34 +++ deliantra/server/socket/image.C 2007/04/03 00:21:38 1.39 @@ -257,13 +257,15 @@ faces_sent[facenum] = true; + // if for some reason we let a client without face caching connect, + // we better support that decision here and implement it. if (!facecache) + return send_image (facenum); + + if (fxix) { - send_drawinfo ( - "*** Please enable image/face caching in preferences or use a client that supports it.\n", - NDI_RED - ); - return send_image (facenum); + fxface.push_back (facenum); + return; } packet sl; @@ -293,6 +295,34 @@ } } +void client::flush_fx () +{ + while (!fxface.empty ()) + { + packet sl ("fx"); + + do + { + faceidx facenum = fxface.back (); fxface.pop_back (); + + const facedata *d = face_data (facenum, faceset); + + if (d) + { + sl << ber32 (facenum) + << data8 (d->chksum, CHKSUM_SIZE); + + faceinfo *f = face_info (facenum); + if (f->smooth && EMI_smooth) + sl << ber32 (f->smooth); + } + } + while (!fxface.empty () && sl.room () > CHKSUM_SIZE + 8 + 8); + + send_packet (sl); + } +} + void client::send_image (faceidx facenum) { @@ -310,6 +340,9 @@ faces_sent[facenum] = true; + if (force_image_newmap) + force_newmap = true; + packet sl; sl << (image2 ? "image2 " : "image ")