--- deliantra/server/socket/image.C 2007/03/14 00:07:26 1.29 +++ deliantra/server/socket/image.C 2007/03/14 01:19:10 1.30 @@ -256,10 +256,23 @@ if (facecache && !forced) { - if (faces_sent[facenum] & NS_FACESENT_FACE) + if (faces_sent[facenum]) return; - faces_sent[facenum] |= NS_FACESENT_FACE; + faces_sent[facenum] = true; + + faceinfo *f = face_info (facenum); + if (f->smooth && EMI_smooth) + { + send_face (f->smooth); + + packet sl ("smooth"); + + sl << uint16 (facenum) + << uint16 (f->smooth); + + send_packet (sl); + } if (force_face0) sl << "face " << uint16 (facenum); @@ -305,45 +318,6 @@ } /** - * A lot like the old AskSmooth (in fact, now called by AskSmooth). - * Basically, it makes no sense to wait for the client to request a - * a piece of data from us that we know the client wants. So - * if we know the client wants it, might as well push it to the - * client. - */ -void -client::send_smooth (faceidx face) -{ - faceinfo *f = face_info (face); - - if (!f) - return; - - if (faces_sent[face] & NS_FACESENT_SMOOTH) - return; - - faces_sent[face] |= NS_FACESENT_SMOOTH; - - /* If we can't find a face, return and set it so we won't try to send this - * again. - */ - if (!f->smooth) - { - LOG (llevError, "could not findsmooth for %d.\n", face); - return; - } - - send_face (f->smooth); - - packet sl ("smooth"); - - sl << uint16 (face) - << uint16 (f->smooth); - - send_packet (sl); -} - -/** * Need to send an animation sequence to the client. * We will send appropriate face commands to the client if we haven't * sent them the face yet (this can become quite costly in terms of @@ -435,7 +409,7 @@ for (int i = start; i <= stop && i < faces.size (); i++) { - ns->faces_sent[i] |= NS_FACESENT_FACE; + ns->faces_sent[i] = true; const facedata *d = face_data (i, ns->faceset);