--- deliantra/server/socket/item.C 2008/07/14 23:47:06 1.69 +++ deliantra/server/socket/item.C 2008/12/19 22:47:30 1.75 @@ -166,8 +166,6 @@ if (ns.itemcmd == 2) sl << uint16 (head->client_type); - - SET_FLAG (head, FLAG_CLIENT_SENT); } static faceidx @@ -387,13 +385,6 @@ if (!ns) return; - if (!QUERY_FLAG (op, FLAG_CLIENT_SENT)) - /* FLAG_CLIENT_SENT is debug only. We are using it to see where - * this is happening - we can set a breakpoint here in the debugger - * and track back the call. - */ - LOG (llevDebug | logBacktrace, "We have not sent item %s (%d)\n", &op->name, op->count); - packet sl ("upditem"); sl << uint8 (flags); @@ -410,9 +401,9 @@ if (flags & UPD_WEIGHT) { - sint32 weight = op->flag [FLAG_NO_PICK] ? -1 : op->client_weight (); + sint32 weight = op->client_weight (); - if (op) + if (op == pl) ns->last_weight = weight; sl << uint32 (weight); @@ -511,7 +502,6 @@ add_object_to_socklist (*pl->contr->ns, sl, op); pl->contr->ns->send_packet (sl); - SET_FLAG (op, FLAG_CLIENT_SENT); } /** @@ -609,11 +599,9 @@ { std::string s = op->describe (pl->ob); - if (msg_is_special (s.c_str (), false)) - cfperl_expand_cfpod (pl, s); - packet sl ("ex"); - sl << ber32 (tag) << s.c_str (); + sl << ber32 (tag) + << data (*pl->expand_cfpod (s.c_str ())); pl->ns->send_packet (sl); } @@ -708,16 +696,16 @@ continue; if (QUERY_FLAG (ob, FLAG_WIZ)) - buf.printf ("- %s (%d).\n", query_name (tmp), tmp->count); + buf.printf (" - %s (%d).\n", query_name (tmp), tmp->count); else - buf.printf ("- %s.\n", query_name (tmp)); + buf.printf (" - %s.\n", query_name (tmp)); object *head = tmp->head_ (); if (head->inv) if ((head->type != CONTAINER && head->type != FLESH) || QUERY_FLAG (ob, FLAG_WIZ)) - buf << head->query_inventory (ob, " "); + buf << head->query_inventory (ob, " "); if (QUERY_FLAG (tmp, FLAG_IS_FLOOR) && !QUERY_FLAG (ob, FLAG_WIZ)) /* don't continue under the floor */ break; @@ -743,13 +731,8 @@ if (player *opl = pl->observe->contr) if (client *ns = opl->ns) - { - if (fabs (dx) > ns->mapx / 2 || fabs (dy) > ns->mapy / 2) - return; - - if (opl->blocked_los[dx + ns->mapx / 2][dy + ns->mapy / 2]) - return; - } + if (opl->blocked_los (dx, dy) >= LOS_MAX) + return; look_at (pl, dx, dy); }