… | |
… | |
260 | // if for some reason we let a client without face caching connect, |
260 | // if for some reason we let a client without face caching connect, |
261 | // we better support that decision here and implement it. |
261 | // we better support that decision here and implement it. |
262 | if (!facecache) |
262 | if (!facecache) |
263 | return send_image (facenum); |
263 | return send_image (facenum); |
264 | |
264 | |
|
|
265 | if (fxix) |
|
|
266 | { |
|
|
267 | fxface.push_back (facenum); |
|
|
268 | return; |
|
|
269 | } |
|
|
270 | |
265 | packet sl; |
271 | packet sl; |
266 | |
272 | |
267 | if (force_face0) |
273 | if (force_face0) |
268 | sl << "face " << uint16 (facenum); |
274 | sl << "face " << uint16 (facenum); |
269 | else if (image2) |
275 | else if (image2) |
… | |
… | |
282 | |
288 | |
283 | packet sl ("smooth"); |
289 | packet sl ("smooth"); |
284 | |
290 | |
285 | sl << uint16 (facenum) |
291 | sl << uint16 (facenum) |
286 | << 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); |
287 | |
321 | |
288 | send_packet (sl); |
322 | send_packet (sl); |
289 | } |
323 | } |
290 | } |
324 | } |
291 | |
325 | |