--- deliantra/server/socket/request.C 2006/12/14 04:30:33 1.36 +++ deliantra/server/socket/request.C 2006/12/14 20:39:54 1.37 @@ -701,7 +701,7 @@ << uint16 (face) << uint16 (smoothface); - Send_With_Handling (ns, &sl); + ns->send_packet (sl); } /** @@ -834,7 +834,7 @@ packet sl; sl << "comc " << uint16 (pktlen) << uint32 (time); - Send_With_Handling (pl->socket, &sl); + pl->socket->send_packet (sl); } @@ -1175,7 +1175,7 @@ /* Only send it away if we have some actual data */ if (sl.length () > 6) - Send_With_Handling (pl->socket, &sl); + pl->socket->send_packet (sl); } /** @@ -1194,7 +1194,7 @@ << uint32 (pl->ob->face->number) << data8 (pl->ob->name); - Send_With_Handling (pl->socket, &sl); + pl->socket->send_packet (sl); SET_FLAG (pl->ob, FLAG_CLIENT_SENT); } @@ -1236,7 +1236,7 @@ sl << uint16 (animations[anim_num].faces[i]); /* flags - not used right now */ } - Send_With_Handling (ns, &sl); + ns->send_packet (sl); ns->anims_sent[anim_num] = 1; } @@ -1870,11 +1870,11 @@ */ got_one = 0; for (i = oldlen + 2; i < sl.length (); i++) - if (sl.buf[i]) + if (sl[i]) got_one = 1; if (got_one && (mask & 0xf)) - sl.buf[oldlen + 1] = mask & 0xff; + sl[oldlen + 1] = mask & 0xff; else { /*either all faces blank, either no face at all */ if (mask & 0xf) /*at least 1 face, we know it's blank, only send coordinates */ @@ -1950,7 +1950,7 @@ } if ((mask & 0xf) || need_send) - sl.buf[oldlen + 1] = mask & 0xff; + sl[oldlen + 1] = mask & 0xff; else sl.reset (oldlen); } @@ -1990,7 +1990,7 @@ if (socket.extmap) { *last_ext |= 0x80; - last_ext = sl.buf + sl.length (); + last_ext = &sl[sl.length ()]; sl << uint8 (d); } else @@ -2034,14 +2034,14 @@ mask |= 0x8; *last_ext |= 0x80; - last_ext = sl.buf + sl.length (); + last_ext = &sl[sl.length ()]; sl << uint8 (5) << uint8 (stat_hp); if (stat_width > 1) { *last_ext |= 0x80; - last_ext = sl.buf + sl.length (); + last_ext = &sl[sl.length ()]; sl << uint8 (6) << uint8 (stat_width); } @@ -2053,7 +2053,7 @@ mask |= 0x8; *last_ext |= 0x80; - last_ext = sl.buf + sl.length (); + last_ext = &sl[sl.length ()]; sl << uint8 (0x47) << uint8 (8) << (uint64)player; } @@ -2064,7 +2064,7 @@ mask |= 0x8; *last_ext |= 0x80; - last_ext = sl.buf + sl.length (); + last_ext = &sl[sl.length ()]; sl << uint8 (8) << uint8 (flags); } @@ -2116,12 +2116,12 @@ * value, so we don't send those bits. */ if (mask & 0xf) - sl.buf[oldlen + 1] = mask & 0xff; + sl[oldlen + 1] = mask & 0xff; else sl.reset (oldlen); if (emask & 0xf) - esl.buf[eoldlen + 1] = emask & 0xff; + esl[eoldlen + 1] = emask & 0xff; else esl.reset (eoldlen); } /* else this is a viewable space */ @@ -2137,16 +2137,16 @@ * it doesn't need draw! */ ewhatflag &= (~EMI_NOREDRAW); - esl.buf[ewhatstart + 1] = ewhatflag & 0xff; + esl[ewhatstart + 1] = ewhatflag & 0xff; } if (esl.length () > estartlen) - Send_With_Handling (&socket, &esl); + socket.send_packet (esl); } if (sl.length () > startlen || socket.sent_scroll) { - Send_With_Handling (&socket, &sl); + socket.send_packet (sl); socket.sent_scroll = 0; } } @@ -2248,7 +2248,7 @@ fatal (0); } - Send_With_Handling (ns, &sl); + ns->send_packet (sl); } /** @@ -2271,7 +2271,7 @@ fatal (0); } - Send_With_Handling (ns, &sl); + ns->send_packet (sl); } /** @@ -2321,7 +2321,7 @@ if (flags & UPD_SP_GRACE ) sl << uint16 (spell->last_grace); if (flags & UPD_SP_DAMAGE) sl << uint16 (spell->last_eat); - Send_With_Handling (pl->socket, &sl); + pl->socket->send_packet (sl); } } } @@ -2344,7 +2344,7 @@ sl << "delspell " << uint32 (spell->count); - Send_With_Handling (pl->socket, &sl); + pl->socket->send_packet (sl); } /* appends the spell *spell to the Socklist we will send the data to. */ @@ -2431,7 +2431,7 @@ if (sl.length () >= (MAXSOCKBUF - (26 + strlen (spell->name) + (spell->msg ? strlen (spell->msg) : 0)))) { - Send_With_Handling (pl->socket, &sl); + pl->socket->send_packet (sl); sl.reset (); sl << "addspell "; @@ -2455,6 +2455,6 @@ } /* finally, we can send the packet */ - Send_With_Handling (pl->socket, &sl); + pl->socket->send_packet (sl); }