--- deliantra/server/socket/request.C 2007/07/24 04:55:35 1.116 +++ deliantra/server/socket/request.C 2007/07/29 18:34:46 1.117 @@ -1532,6 +1532,8 @@ spell->face = face_find ("burnout.x11", blank_face); } + pl->ns->send_face (spell->face); + /* send the current values */ sl << uint32 (spell->count) << uint16 (spell->level) @@ -1576,16 +1578,17 @@ * won't take us over the length limit for the socket, if it does, * we need to send what we already have, and restart packet formation */ + if (spell->type != SPELL) + continue; + /* Seeing crashes by overflowed buffers. Quick arithemetic seems * to show add_spell is 26 bytes + 2 strings. However, the overun * is hundreds of bytes off, so correcting 22 vs 26 doesn't seem * like it will fix this */ - if (spell->type != SPELL) - continue; - if (sl.length () >= (MAXSOCKBUF - (26 + strlen (spell->name) + (spell->msg ? strlen (spell->msg) : 0)))) { + pl->ns->flush_fx (); pl->ns->send_packet (sl); sl.reset (); @@ -1610,6 +1613,7 @@ } /* finally, we can send the packet */ + pl->ns->flush_fx (); pl->ns->send_packet (sl); }