--- deliantra/server/socket/image.C 2007/04/03 00:21:38 1.39 +++ deliantra/server/socket/image.C 2007/04/10 09:35:24 1.40 @@ -281,17 +281,21 @@ print_facename (sl, *d); send_packet (sl); - faceinfo *f = face_info (facenum); - if (f->smooth && EMI_smooth) + if (EMI_smooth) { - send_face (f->smooth); + faceinfo *f = face_info (facenum); - packet sl ("smooth"); + if (f->smooth) + { + send_face (f->smooth); + + packet sl ("smooth"); - sl << uint16 (facenum) - << uint16 (f->smooth); + sl << uint16 (facenum) + << uint16 (f->smooth); - send_packet (sl); + send_packet (sl); + } } } @@ -299,7 +303,8 @@ { while (!fxface.empty ()) { - packet sl ("fx"); + packet fx ("fx"); + packet sx ("sx"); do { @@ -309,17 +314,29 @@ if (d) { - sl << ber32 (facenum) + fx << ber32 (facenum) << data8 (d->chksum, CHKSUM_SIZE); - faceinfo *f = face_info (facenum); - if (f->smooth && EMI_smooth) - sl << ber32 (f->smooth); + if (smoothing) + { + faceinfo *f = face_info (facenum); + + if (f->smooth) + { + send_face (f->smooth); + sx << ber32 (facenum) + << ber32 (f->smooth) + << ber32 (f->smoothlevel); + } + } } } - while (!fxface.empty () && sl.room () > CHKSUM_SIZE + 8 + 8); + while (!fxface.empty () + && fx.room () > ber32::size + CHKSUM_SIZE + 1 + && sx.room () > ber32::size * 3); - send_packet (sl); + send_packet (fx); + if (sx.length () > 3) send_packet (sx); } }