ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/socket/item.C
(Generate patch)

Comparing deliantra/server/socket/item.C (file contents):
Revision 1.60 by root, Tue Apr 22 07:01:47 2008 UTC vs.
Revision 1.61 by root, Tue Apr 22 07:28:05 2008 UTC

506 */ 506 */
507void 507void
508esrv_update_item (int flags, object *pl, object *op) 508esrv_update_item (int flags, object *pl, object *op)
509{ 509{
510 /* If we have a request to send the player item, skip a few checks. */ 510 /* If we have a request to send the player item, skip a few checks. */
511 if (op != pl)
512 {
513 if (!op->client_visible ()) 511 if (op != pl && !op->client_visible ())
514 return; 512 return;
515 /* we remove the check for op->env, because in theory, the object
516 * is hopefully in the same place, so the client should preserve
517 * order.
518 */
519 }
520 513
521 client *ns = pl->contr->ns; 514 client *ns = pl->contr->ns;
522 if (!ns) 515 if (!ns)
523 return; 516 return;
524 517
546 if (flags & UPD_FLAGS) 539 if (flags & UPD_FLAGS)
547 sl << uint32 (query_flags (op)); 540 sl << uint32 (query_flags (op));
548 541
549 if (flags & UPD_WEIGHT) 542 if (flags & UPD_WEIGHT)
550 { 543 {
551 sint32 weight = op->client_weight (); 544 sint32 weight = op->flag [FLAG_NO_PICK] ? -1 : op->client_weight ();
552 545
553 sl << uint32 (QUERY_FLAG (op, FLAG_NO_PICK) ? -1 : weight);
554
555#if 0
556 if (pl == op) 546 if (op)
557 ns->last_weight = weight; 547 ns->last_weight = weight;
558#endif 548
549 sl << uint32 (weight);
559 } 550 }
560 551
561 if (flags & UPD_FACE) 552 if (flags & UPD_FACE)
562 { 553 {
563 ns->send_face (op->face, -50); 554 ns->send_face (op->face, -50);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines