… | |
… | |
279 | |
279 | |
280 | // how lame |
280 | // how lame |
281 | print_facename (sl, *d); |
281 | print_facename (sl, *d); |
282 | send_packet (sl); |
282 | send_packet (sl); |
283 | |
283 | |
|
|
284 | if (EMI_smooth) |
|
|
285 | { |
284 | faceinfo *f = face_info (facenum); |
286 | faceinfo *f = face_info (facenum); |
285 | if (f->smooth && EMI_smooth) |
287 | |
286 | { |
288 | if (f->smooth) |
|
|
289 | { |
287 | send_face (f->smooth); |
290 | send_face (f->smooth); |
288 | |
291 | |
289 | packet sl ("smooth"); |
292 | packet sl ("smooth"); |
290 | |
293 | |
291 | sl << uint16 (facenum) |
294 | sl << uint16 (facenum) |
292 | << uint16 (f->smooth); |
295 | << uint16 (f->smooth); |
293 | |
296 | |
294 | send_packet (sl); |
297 | send_packet (sl); |
|
|
298 | } |
295 | } |
299 | } |
296 | } |
300 | } |
297 | |
301 | |
298 | void client::flush_fx () |
302 | void client::flush_fx () |
299 | { |
303 | { |
300 | while (!fxface.empty ()) |
304 | while (!fxface.empty ()) |
301 | { |
305 | { |
302 | packet sl ("fx"); |
306 | packet fx ("fx"); |
|
|
307 | packet sx ("sx"); |
303 | |
308 | |
304 | do |
309 | do |
305 | { |
310 | { |
306 | faceidx facenum = fxface.back (); fxface.pop_back (); |
311 | faceidx facenum = fxface.back (); fxface.pop_back (); |
307 | |
312 | |
308 | const facedata *d = face_data (facenum, faceset); |
313 | const facedata *d = face_data (facenum, faceset); |
309 | |
314 | |
310 | if (d) |
315 | if (d) |
311 | { |
316 | { |
312 | sl << ber32 (facenum) |
317 | fx << ber32 (facenum) |
313 | << data8 (d->chksum, CHKSUM_SIZE); |
318 | << data8 (d->chksum, CHKSUM_SIZE); |
314 | |
319 | |
|
|
320 | if (smoothing) |
|
|
321 | { |
315 | faceinfo *f = face_info (facenum); |
322 | faceinfo *f = face_info (facenum); |
|
|
323 | |
316 | if (f->smooth && EMI_smooth) |
324 | if (f->smooth) |
|
|
325 | { |
|
|
326 | send_face (f->smooth); |
|
|
327 | sx << ber32 (facenum) |
317 | sl << ber32 (f->smooth); |
328 | << ber32 (f->smooth) |
|
|
329 | << ber32 (f->smoothlevel); |
|
|
330 | } |
|
|
331 | } |
318 | } |
332 | } |
319 | } |
333 | } |
320 | while (!fxface.empty () && sl.room () > CHKSUM_SIZE + 8 + 8); |
334 | while (!fxface.empty () |
|
|
335 | && fx.room () > ber32::size + CHKSUM_SIZE + 1 |
|
|
336 | && sx.room () > ber32::size * 3); |
321 | |
337 | |
322 | send_packet (sl); |
338 | send_packet (fx); |
|
|
339 | if (sx.length () > 3) send_packet (sx); |
323 | } |
340 | } |
324 | } |
341 | } |
325 | |
342 | |
326 | void |
343 | void |
327 | client::send_image (faceidx facenum) |
344 | client::send_image (faceidx facenum) |
… | |
… | |
387 | { |
404 | { |
388 | /* Do some checking on the anim_num we got. Note that the animations |
405 | /* Do some checking on the anim_num we got. Note that the animations |
389 | * are added in contigous order, so if the number is in the valid |
406 | * are added in contigous order, so if the number is in the valid |
390 | * range, it must be a valid animation. |
407 | * range, it must be a valid animation. |
391 | */ |
408 | */ |
392 | if (anim_num < 0 || anim_num > num_animations) |
409 | if (anim_num < 0 || anim_num >= animations.size ()) |
393 | { |
410 | { |
394 | LOG (llevError, "esrv_send_anim (%d) out of bounds??\n", anim_num); |
411 | LOG (llevError, "esrv_send_anim (%d) out of bounds??\n", anim_num); |
395 | return; |
412 | return; |
396 | } |
413 | } |
397 | |
414 | |