… | |
… | |
395 | /* we remove the check for op->env, because in theory, the object |
395 | /* we remove the check for op->env, because in theory, the object |
396 | * is hopefully in the same place, so the client should preserve |
396 | * is hopefully in the same place, so the client should preserve |
397 | * order. |
397 | * order. |
398 | */ |
398 | */ |
399 | } |
399 | } |
|
|
400 | |
400 | if (!QUERY_FLAG (op, FLAG_CLIENT_SENT)) |
401 | if (!QUERY_FLAG (op, FLAG_CLIENT_SENT)) |
401 | { |
402 | { |
402 | /* FLAG_CLIENT_SENT is debug only. We are using it to see where |
403 | /* FLAG_CLIENT_SENT is debug only. We are using it to see where |
403 | * this is happening - we can set a breakpoint here in the debugger |
404 | * this is happening - we can set a breakpoint here in the debugger |
404 | * and track back the call. |
405 | * and track back the call. |
405 | */ |
406 | */ |
406 | LOG (llevDebug, "We have not sent item %s (%d)\n", &op->name, op->count); |
407 | LOG (llevDebug, "We have not sent item %s (%d)\n", &op->name, op->count); |
407 | } |
408 | } |
|
|
409 | |
408 | sl.buf = (unsigned char *) malloc (MAXSOCKBUF); |
410 | sl.buf = (unsigned char *) malloc (MAXSOCKBUF); |
409 | |
411 | |
410 | strcpy ((char *) sl.buf, "upditem "); |
412 | strcpy ((char *) sl.buf, "upditem "); |
411 | sl.len = strlen ((char *) sl.buf); |
413 | sl.len = strlen ((char *) sl.buf); |
412 | |
414 | |
… | |
… | |
438 | { |
440 | { |
439 | if (!(pl->contr->socket.faces_sent[op->face->number] & NS_FACESENT_FACE)) |
441 | if (!(pl->contr->socket.faces_sent[op->face->number] & NS_FACESENT_FACE)) |
440 | esrv_send_face (&pl->contr->socket, op->face->number, 0); |
442 | esrv_send_face (&pl->contr->socket, op->face->number, 0); |
441 | SockList_AddInt (&sl, op->face->number); |
443 | SockList_AddInt (&sl, op->face->number); |
442 | } |
444 | } |
|
|
445 | |
443 | if (flags & UPD_NAME) |
446 | if (flags & UPD_NAME) |
444 | { |
447 | { |
445 | int len; |
448 | int len; |
446 | const char *item_p; |
449 | const char *item_p; |
447 | char item_n[MAX_BUF]; |
450 | char item_n[MAX_BUF]; |
… | |
… | |
466 | len += strlen (item_n + 1 + len) + 1; |
469 | len += strlen (item_n + 1 + len) + 1; |
467 | SockList_AddChar (&sl, (char) len); |
470 | SockList_AddChar (&sl, (char) len); |
468 | memcpy (sl.buf + sl.len, item_n, len); |
471 | memcpy (sl.buf + sl.len, item_n, len); |
469 | sl.len += len; |
472 | sl.len += len; |
470 | } |
473 | } |
|
|
474 | |
471 | if (flags & UPD_ANIM) |
475 | if (flags & UPD_ANIM) |
472 | SockList_AddShort (&sl, op->animation_id); |
476 | SockList_AddShort (&sl, op->animation_id); |
473 | |
477 | |
474 | if (flags & UPD_ANIMSPEED) |
478 | if (flags & UPD_ANIMSPEED) |
475 | { |
479 | { |