… | |
… | |
255 | if (faces_sent[facenum]) |
255 | if (faces_sent[facenum]) |
256 | return; |
256 | return; |
257 | |
257 | |
258 | faces_sent[facenum] = true; |
258 | faces_sent[facenum] = true; |
259 | |
259 | |
|
|
260 | // if for some reason we let a client without face caching connect, |
|
|
261 | // we better support that decision here and implement it. |
260 | if (!facecache) |
262 | if (!facecache) |
|
|
263 | return send_image (facenum); |
|
|
264 | |
|
|
265 | if (fxix) |
261 | { |
266 | { |
262 | send_drawinfo ( |
267 | fxface.push_back (facenum); |
263 | "\n" |
|
|
264 | "\n" |
|
|
265 | "***\n" |
|
|
266 | "*** WARNING:\n" |
|
|
267 | "*** Your client does not support face/image caching,\n" |
|
|
268 | "*** or it has been disabled. Face caching is mandatory\n" |
|
|
269 | "*** so please enable it or use a newer client.\n" |
|
|
270 | "***\n" |
|
|
271 | "*** Look at your client preferences:\n" |
|
|
272 | "***\n" |
|
|
273 | "*** CFPlus: all known versions automatically enable the facecache.\n" |
|
|
274 | "*** cfclient: use the -cache commandline option.\n" |
|
|
275 | "*** cfclient: map will not redraw automatically (bug).\n" |
|
|
276 | "*** gcfclient: use -cache commandline option, or enable\n" |
|
|
277 | "*** gcfclient: Client=>Configure=>Map & Image=>Cache Images.\n" |
|
|
278 | "*** jcrossclient: your client is broken, use CFPlus or gcfclient.\n" |
|
|
279 | "***\n" |
|
|
280 | "***\n", |
|
|
281 | NDI_RED |
|
|
282 | ); |
|
|
283 | return; |
268 | return; |
284 | //return send_image (facenum); |
|
|
285 | } |
269 | } |
286 | |
270 | |
287 | packet sl; |
271 | packet sl; |
288 | |
272 | |
289 | if (force_face0) |
273 | if (force_face0) |
… | |
… | |
304 | |
288 | |
305 | packet sl ("smooth"); |
289 | packet sl ("smooth"); |
306 | |
290 | |
307 | sl << uint16 (facenum) |
291 | sl << uint16 (facenum) |
308 | << uint16 (f->smooth); |
292 | << uint16 (f->smooth); |
|
|
293 | |
|
|
294 | send_packet (sl); |
|
|
295 | } |
|
|
296 | } |
|
|
297 | |
|
|
298 | void client::flush_fx () |
|
|
299 | { |
|
|
300 | while (!fxface.empty ()) |
|
|
301 | { |
|
|
302 | packet sl ("fx"); |
|
|
303 | |
|
|
304 | do |
|
|
305 | { |
|
|
306 | faceidx facenum = fxface.back (); fxface.pop_back (); |
|
|
307 | |
|
|
308 | const facedata *d = face_data (facenum, faceset); |
|
|
309 | |
|
|
310 | if (d) |
|
|
311 | { |
|
|
312 | sl << ber32 (facenum) |
|
|
313 | << data8 (d->chksum, CHKSUM_SIZE); |
|
|
314 | |
|
|
315 | faceinfo *f = face_info (facenum); |
|
|
316 | if (f->smooth && EMI_smooth) |
|
|
317 | sl << ber32 (f->smooth); |
|
|
318 | } |
|
|
319 | } |
|
|
320 | while (!fxface.empty () && sl.room () > CHKSUM_SIZE + 8 + 8); |
309 | |
321 | |
310 | send_packet (sl); |
322 | send_packet (sl); |
311 | } |
323 | } |
312 | } |
324 | } |
313 | |
325 | |