--- deliantra/server/socket/item.c 2006/02/22 18:03:28 1.1.1.2 +++ deliantra/server/socket/item.c 2006/08/13 17:16:06 1.5 @@ -290,7 +290,7 @@ add_object_to_socklist(&pl->contr->socket, &sl, head); got_one++; - if (sl.len > (MAXSOCKBUF-MAXITEMLEN)) { + if (sl.len >= (MAXSOCKBUF-MAXITEMLEN)) { Send_With_Handling(&pl->contr->socket, &sl); sprintf((char*)sl.buf,"item%d ", pl->contr->socket.itemcmd); sl.len=strlen((char*)sl.buf); @@ -340,7 +340,7 @@ * items (especially with some of the bags out there) to * overflow the buffer. IF so, send multiple item commands. */ - if (sl.len > (MAXSOCKBUF-MAXITEMLEN)) { + if (sl.len >= (MAXSOCKBUF-MAXITEMLEN)) { Send_With_Handling(&pl->contr->socket, &sl); sprintf((char*)sl.buf,"item%d ", pl->contr->socket.itemcmd); sl.len=strlen((char*)sl.buf); @@ -659,12 +659,11 @@ sint16 x,y; mapstruct *m; - - if (out_of_map(op->map, op->x+dx, op->y+dy)) return; - x = op->x + dx; y = op->y + dy; + if (out_of_map(op->map, x, y)) return; + m = get_map_from_coord(op->map, &x, &y); if (!m) return; @@ -719,11 +718,12 @@ } dy=atoi(cp); - if (FABS(dx)>MAP_CLIENT_X/2 || FABS(dy)>MAP_CLIENT_Y/2) + if (FABS(dx) > pl->socket.mapx / 2 || FABS(dy) > pl->socket.mapy / 2) return; - if(pl->blocked_los[dx+(pl->socket.mapx/2)][dy+(pl->socket.mapy/2)]) + if(pl->blocked_los[dx + pl->socket.mapx / 2][dy + pl->socket.mapy / 2]) return; + look_at(pl->ob, dx, dy); }