… | |
… | |
164 | sl << uint8 (anim_speed) |
164 | sl << uint8 (anim_speed) |
165 | << uint32 (head->nrof); |
165 | << uint32 (head->nrof); |
166 | |
166 | |
167 | if (ns.itemcmd == 2) |
167 | if (ns.itemcmd == 2) |
168 | sl << uint16 (head->client_type); |
168 | sl << uint16 (head->client_type); |
169 | |
|
|
170 | SET_FLAG (head, FLAG_CLIENT_SENT); |
|
|
171 | } |
169 | } |
172 | |
170 | |
173 | static faceidx |
171 | static faceidx |
174 | need_face_now (player *pl, const char *name) |
172 | need_face_now (player *pl, const char *name) |
175 | { |
173 | { |
… | |
… | |
384 | return; |
382 | return; |
385 | |
383 | |
386 | client *ns = pl->contr->ns; |
384 | client *ns = pl->contr->ns; |
387 | if (!ns) |
385 | if (!ns) |
388 | return; |
386 | return; |
389 | |
|
|
390 | if (!QUERY_FLAG (op, FLAG_CLIENT_SENT)) |
|
|
391 | /* FLAG_CLIENT_SENT is debug only. We are using it to see where |
|
|
392 | * this is happening - we can set a breakpoint here in the debugger |
|
|
393 | * and track back the call. |
|
|
394 | */ |
|
|
395 | LOG (llevDebug | logBacktrace, "We have not sent item %s (%d)\n", &op->name, op->count); |
|
|
396 | |
387 | |
397 | packet sl ("upditem"); |
388 | packet sl ("upditem"); |
398 | |
389 | |
399 | sl << uint8 (flags); |
390 | sl << uint8 (flags); |
400 | |
391 | |
… | |
… | |
509 | sl << uint32 (op->env ? op->env->count : 0); |
500 | sl << uint32 (op->env ? op->env->count : 0); |
510 | |
501 | |
511 | add_object_to_socklist (*pl->contr->ns, sl, op); |
502 | add_object_to_socklist (*pl->contr->ns, sl, op); |
512 | |
503 | |
513 | pl->contr->ns->send_packet (sl); |
504 | pl->contr->ns->send_packet (sl); |
514 | SET_FLAG (op, FLAG_CLIENT_SENT); |
|
|
515 | } |
505 | } |
516 | |
506 | |
517 | /** |
507 | /** |
518 | * Tells the client to delete an item. |
508 | * Tells the client to delete an item. |
519 | */ |
509 | */ |