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

Comparing deliantra/server/common/object.C (file contents):
Revision 1.249 by root, Tue Jul 15 20:41:58 2008 UTC vs.
Revision 1.252 by root, Mon Aug 11 23:23:41 2008 UTC

762 else if (action == UP_OBJ_INSERT) 762 else if (action == UP_OBJ_INSERT)
763 { 763 {
764 // this is likely overkill, TODO: revisit (schmorp) 764 // this is likely overkill, TODO: revisit (schmorp)
765 if ((QUERY_FLAG (op, FLAG_BLOCKSVIEW) && !(m.flags_ & P_BLOCKSVIEW)) 765 if ((QUERY_FLAG (op, FLAG_BLOCKSVIEW) && !(m.flags_ & P_BLOCKSVIEW))
766 || (QUERY_FLAG (op, FLAG_NO_MAGIC) && !(m.flags_ & P_NO_MAGIC)) 766 || (QUERY_FLAG (op, FLAG_NO_MAGIC) && !(m.flags_ & P_NO_MAGIC))
767 || (op->type == PLAYER && !(m.flags_ & P_PLAYER))
768 || (op->type == SAFE_GROUND && !(m.flags_ & P_SAFE)) 767 || (op->type == SAFE_GROUND && !(m.flags_ & P_SAFE))
769 || (QUERY_FLAG (op, FLAG_ALIVE) && !(m.flags_ & P_IS_ALIVE)) 768 || (QUERY_FLAG (op, FLAG_ALIVE) && !(m.flags_ & P_IS_ALIVE))
770 || (QUERY_FLAG (op, FLAG_DAMNED) && !(m.flags_ & P_NO_CLERIC)) 769 || (QUERY_FLAG (op, FLAG_DAMNED) && !(m.flags_ & P_NO_CLERIC))
771 || (m.move_on | op->move_on ) != m.move_on 770 || (m.move_on | op->move_on ) != m.move_on
772 || (m.move_off | op->move_off ) != m.move_off 771 || (m.move_off | op->move_off ) != m.move_off
773 || (m.move_slow | op->move_slow) != m.move_slow 772 || (m.move_slow | op->move_slow) != m.move_slow
774 /* This isn't perfect, but I don't expect a lot of objects to 773 /* This isn't perfect, but I don't expect a lot of objects to
775 * to have move_allow right now. 774 * have move_allow right now.
776 */ 775 */
777 || ((m.move_block | op->move_block) & ~op->move_allow) != m.move_block 776 || ((m.move_block | op->move_block) & ~op->move_allow) != m.move_block
778 || 1) // the above is not strong enough a test to skip updating. los maybe? TODO (Schmorp) 777 || 1) // the above is not strong enough a test to skip updating. los maybe? TODO (Schmorp)
779 m.flags_ = 0; 778 m.flags_ = 0;
780 } 779 }
910 || map->in_memory != MAP_ACTIVE 909 || map->in_memory != MAP_ACTIVE
911 || map->no_drop 910 || map->no_drop
912 || ms ().move_block == MOVE_ALL) 911 || ms ().move_block == MOVE_ALL)
913 { 912 {
914 while (inv) 913 while (inv)
915 {
916 inv->destroy_inv (false);
917 inv->destroy (); 914 inv->destroy (true);
918 }
919 } 915 }
920 else 916 else
921 { /* Put objects in inventory onto this space */ 917 { /* Put objects in inventory onto this space */
922 while (inv) 918 while (inv)
923 { 919 {
1538 if (!nr) 1534 if (!nr)
1539 return true; 1535 return true;
1540 1536
1541 nr = min (nr, nrof); 1537 nr = min (nr, nrof);
1542 1538
1539 if (nrof > nr)
1540 {
1543 nrof -= nr; 1541 nrof -= nr;
1544
1545 if (nrof)
1546 {
1547 adjust_weight (env, -weight * max (1, nr)); // carrying == 0 1542 adjust_weight (env, -weight * max (1, nr)); // carrying == 0
1548 1543
1549 if (object *pl = visible_to ()) 1544 if (object *pl = visible_to ())
1550 esrv_update_item (UPD_NROF, pl, this); 1545 esrv_update_item (UPD_NROF, pl, this);
1551 1546

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines