… | |
… | |
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) |
… | |
… | |
309 | |
293 | |
310 | send_packet (sl); |
294 | send_packet (sl); |
311 | } |
295 | } |
312 | } |
296 | } |
313 | |
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); |
|
|
321 | |
|
|
322 | send_packet (sl); |
|
|
323 | } |
|
|
324 | } |
|
|
325 | |
314 | void |
326 | void |
315 | client::send_image (faceidx facenum) |
327 | client::send_image (faceidx facenum) |
316 | { |
328 | { |
317 | // never send face 0. ever. it does not exist. |
329 | // never send face 0. ever. it does not exist. |
318 | if (!facenum) |
330 | if (!facenum) |
… | |
… | |
325 | LOG (llevError, "client::send_image (%d) out of bounds??\n", facenum); |
337 | LOG (llevError, "client::send_image (%d) out of bounds??\n", facenum); |
326 | return; |
338 | return; |
327 | } |
339 | } |
328 | |
340 | |
329 | faces_sent[facenum] = true; |
341 | faces_sent[facenum] = true; |
|
|
342 | |
|
|
343 | if (force_image_newmap) |
|
|
344 | force_newmap = true; |
330 | |
345 | |
331 | packet sl; |
346 | packet sl; |
332 | |
347 | |
333 | sl << (image2 ? "image2 " : "image ") |
348 | sl << (image2 ? "image2 " : "image ") |
334 | << uint32 (facenum); |
349 | << uint32 (facenum); |