… | |
… | |
264 | |
264 | |
265 | flags = query_flags (head); |
265 | flags = query_flags (head); |
266 | if (QUERY_FLAG (head, FLAG_NO_PICK)) |
266 | if (QUERY_FLAG (head, FLAG_NO_PICK)) |
267 | flags |= F_NOPICK; |
267 | flags |= F_NOPICK; |
268 | |
268 | |
269 | if (!(ns.faces_sent[head->face->number] & NS_FACESENT_FACE)) |
269 | if (!(ns.faces_sent[head->face] & NS_FACESENT_FACE)) |
270 | esrv_send_face (&ns, head->face->number, 0); |
270 | esrv_send_face (&ns, head->face, 0); |
271 | |
271 | |
272 | if (QUERY_FLAG (head, FLAG_ANIMATE) && !ns.anims_sent[head->animation_id]) |
272 | if (QUERY_FLAG (head, FLAG_ANIMATE) && !ns.anims_sent[head->animation_id]) |
273 | esrv_send_animation (&ns, head->animation_id); |
273 | esrv_send_animation (&ns, head->animation_id); |
274 | |
274 | |
275 | sl << uint32 (head->count) |
275 | sl << uint32 (head->count) |
276 | << uint32 (flags) |
276 | << uint32 (flags) |
277 | << uint32 (QUERY_FLAG (head, FLAG_NO_PICK) ? -1 : WEIGHT (head)) |
277 | << uint32 (QUERY_FLAG (head, FLAG_NO_PICK) ? -1 : WEIGHT (head)) |
278 | << uint32 (head->face->number); |
278 | << uint32 (head->face); |
279 | |
279 | |
280 | if (!head->custom_name) |
280 | if (!head->custom_name) |
281 | { |
281 | { |
282 | strncpy (item_n, query_base_name (head, 0), 127); |
282 | strncpy (item_n, query_base_name (head, 0), 127); |
283 | item_n[127] = 0; |
283 | item_n[127] = 0; |
… | |
… | |
356 | packet sl; |
356 | packet sl; |
357 | sl.printf ("item%d ", pl->contr->ns->itemcmd); |
357 | sl.printf ("item%d ", pl->contr->ns->itemcmd); |
358 | |
358 | |
359 | sl << uint32 (0); |
359 | sl << uint32 (0); |
360 | |
360 | |
361 | if (!(pl->contr->ns->faces_sent[empty_face->number] & NS_FACESENT_FACE)) |
361 | if (!(pl->contr->ns->faces_sent[empty_face] & NS_FACESENT_FACE)) |
362 | esrv_send_face (pl->contr->ns, empty_face->number, 0); |
362 | esrv_send_face (pl->contr->ns, empty_face, 0); |
363 | |
363 | |
364 | if (pl->contr->ns->look_position) |
364 | if (pl->contr->ns->look_position) |
365 | { |
365 | { |
366 | char buf[80]; |
366 | char buf[80]; |
367 | snprintf (buf, 80, "Apply this to see %d previous items", FLOORBOX_PAGESIZE); |
367 | snprintf (buf, 80, "Apply this to see %d previous items", FLOORBOX_PAGESIZE); |
368 | |
368 | |
369 | sl << uint32 (0x80000000 | (pl->contr->ns->look_position - FLOORBOX_PAGESIZE)) |
369 | sl << uint32 (0x80000000 | (pl->contr->ns->look_position - FLOORBOX_PAGESIZE)) |
370 | << uint32 (0) |
370 | << uint32 (0) |
371 | << sint32 (-1) |
371 | << sint32 (-1) |
372 | << uint32 (empty_face->number) |
372 | << uint32 (empty_face) |
373 | << data8 (buf) |
373 | << data8 (buf) |
374 | << uint16 (0) |
374 | << uint16 (0) |
375 | << uint8 (0) |
375 | << uint8 (0) |
376 | << uint32 (0); |
376 | << uint32 (0); |
377 | |
377 | |
… | |
… | |
404 | * we notice the special tag the object has, and act accordingly. |
404 | * we notice the special tag the object has, and act accordingly. |
405 | */ |
405 | */ |
406 | sl << uint32 (0x80000000 | (pl->contr->ns->look_position + FLOORBOX_PAGESIZE)) |
406 | sl << uint32 (0x80000000 | (pl->contr->ns->look_position + FLOORBOX_PAGESIZE)) |
407 | << uint32 (0) |
407 | << uint32 (0) |
408 | << uint32 ((uint32) - 1) |
408 | << uint32 ((uint32) - 1) |
409 | << uint32 (empty_face->number) |
409 | << uint32 (empty_face) |
410 | << data8 ("Apply this to see next group of items") |
410 | << data8 ("Apply this to see next group of items") |
411 | << uint16 (0) |
411 | << uint16 (0) |
412 | << uint8 (0) |
412 | << uint8 (0) |
413 | << uint32 (0); |
413 | << uint32 (0); |
414 | |
414 | |
… | |
… | |
555 | ns->last_weight = weight; |
555 | ns->last_weight = weight; |
556 | } |
556 | } |
557 | |
557 | |
558 | if (flags & UPD_FACE) |
558 | if (flags & UPD_FACE) |
559 | { |
559 | { |
560 | if (!(ns->faces_sent[op->face->number] & NS_FACESENT_FACE)) |
560 | if (!(ns->faces_sent[op->face] & NS_FACESENT_FACE)) |
561 | esrv_send_face (ns, op->face->number, 0); |
561 | esrv_send_face (ns, op->face, 0); |
562 | |
562 | |
563 | sl << uint32 (op->face->number); |
563 | sl << uint32 (op->face); |
564 | } |
564 | } |
565 | |
565 | |
566 | if (flags & UPD_NAME) |
566 | if (flags & UPD_NAME) |
567 | { |
567 | { |
568 | int len; |
568 | int len; |