--- deliantra/server/socket/image.C 2007/03/15 16:25:45 1.36 +++ deliantra/server/socket/image.C 2007/04/03 00:21:38 1.39 @@ -257,31 +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 ( - "\n" - "\n" - "***\n" - "*** WARNING:\n" - "*** Your client does not support face/image caching,\n" - "*** or it has been disabled. Face caching is mandatory\n" - "*** so please enable it or use a newer client.\n" - "***\n" - "*** Look at your client preferences:\n" - "***\n" - "*** CFPlus: all known versions automatically enable the facecache.\n" - "*** cfclient: use the -cache commandline option.\n" - "*** cfclient: map will not redraw automatically (bug).\n" - "*** gcfclient: use -cache commandline option, or enable\n" - "*** gcfclient: Client=>Configure=>Map & Image=>Cache Images.\n" - "*** jcrossclient: your client is broken, use CFPlus or gcfclient.\n" - "***\n" - "***\n", - NDI_RED - ); + fxface.push_back (facenum); return; - //return send_image (facenum); } packet sl; @@ -309,6 +293,34 @@ send_packet (sl); } +} + +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