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.250 by root, Wed Jul 16 14:29:40 2008 UTC vs.
Revision 1.253 by root, Sun Aug 17 22:46:26 2008 UTC

770 || (QUERY_FLAG (op, FLAG_DAMNED) && !(m.flags_ & P_NO_CLERIC)) 770 || (QUERY_FLAG (op, FLAG_DAMNED) && !(m.flags_ & P_NO_CLERIC))
771 || (m.move_on | op->move_on ) != m.move_on 771 || (m.move_on | op->move_on ) != m.move_on
772 || (m.move_off | op->move_off ) != m.move_off 772 || (m.move_off | op->move_off ) != m.move_off
773 || (m.move_slow | op->move_slow) != m.move_slow 773 || (m.move_slow | op->move_slow) != m.move_slow
774 /* This isn't perfect, but I don't expect a lot of objects to 774 /* This isn't perfect, but I don't expect a lot of objects to
775 * to have move_allow right now. 775 * have move_allow right now.
776 */ 776 */
777 || ((m.move_block | op->move_block) & ~op->move_allow) != m.move_block 777 || ((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) 778 || 1) // the above is not strong enough a test to skip updating. los maybe? TODO (Schmorp)
779 m.flags_ = 0; 779 m.flags_ = 0;
780 } 780 }
1115 *(below ? &below->above : &ms.bot) = above; 1115 *(below ? &below->above : &ms.bot) = above;
1116 1116
1117 above = 0; 1117 above = 0;
1118 below = 0; 1118 below = 0;
1119 1119
1120 ms.flags_ = 0;
1121
1120 if (map->in_memory == MAP_SAVING) 1122 if (map->in_memory == MAP_SAVING)
1121 return; 1123 return;
1122 1124
1123 int check_walk_off = !flag [FLAG_NO_APPLY]; 1125 int check_walk_off = !flag [FLAG_NO_APPLY];
1124 1126
1155 LOG (llevError, "BUG: remove_ob(): name %s, destroyed leaving object\n", tmp->debug_desc ()); 1157 LOG (llevError, "BUG: remove_ob(): name %s, destroyed leaving object\n", tmp->debug_desc ());
1156 } 1158 }
1157 1159
1158 last = tmp; 1160 last = tmp;
1159 } 1161 }
1160
1161 /* last == NULL if there are no objects on this space */
1162 //TODO: this makes little sense, why only update the topmost object?
1163 if (!last)
1164 map->at (x, y).flags_ = 0;
1165 else
1166 update_object (last, UP_OBJ_REMOVE);
1167 1162
1168 if (flag [FLAG_BLOCKSVIEW] || glow_radius) 1163 if (flag [FLAG_BLOCKSVIEW] || glow_radius)
1169 update_all_los (map, x, y); 1164 update_all_los (map, x, y);
1170 } 1165 }
1171} 1166}
1535 if (!nr) 1530 if (!nr)
1536 return true; 1531 return true;
1537 1532
1538 nr = min (nr, nrof); 1533 nr = min (nr, nrof);
1539 1534
1535 if (nrof > nr)
1536 {
1540 nrof -= nr; 1537 nrof -= nr;
1541
1542 if (nrof)
1543 {
1544 adjust_weight (env, -weight * max (1, nr)); // carrying == 0 1538 adjust_weight (env, -weight * max (1, nr)); // carrying == 0
1545 1539
1546 if (object *pl = visible_to ()) 1540 if (object *pl = visible_to ())
1547 esrv_update_item (UPD_NROF, pl, this); 1541 esrv_update_item (UPD_NROF, pl, this);
1548 1542

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines