--- deliantra/server/common/object.C 2008/07/14 23:47:06 1.248 +++ deliantra/server/common/object.C 2008/08/17 22:46:26 1.253 @@ -772,7 +772,7 @@ || (m.move_off | op->move_off ) != m.move_off || (m.move_slow | op->move_slow) != m.move_slow /* This isn't perfect, but I don't expect a lot of objects to - * to have move_allow right now. + * have move_allow right now. */ || ((m.move_block | op->move_block) & ~op->move_allow) != m.move_block || 1) // the above is not strong enough a test to skip updating. los maybe? TODO (Schmorp) @@ -912,10 +912,7 @@ || ms ().move_block == MOVE_ALL) { while (inv) - { - inv->destroy_inv (false); - inv->destroy (); - } + inv->destroy (true); } else { /* Put objects in inventory onto this space */ @@ -1120,6 +1117,8 @@ above = 0; below = 0; + ms.flags_ = 0; + if (map->in_memory == MAP_SAVING) return; @@ -1161,13 +1160,6 @@ last = tmp; } - /* last == NULL if there are no objects on this space */ - //TODO: this makes little sense, why only update the topmost object? - if (!last) - map->at (x, y).flags_ = 0; - else - update_object (last, UP_OBJ_REMOVE); - if (flag [FLAG_BLOCKSVIEW] || glow_radius) update_all_los (map, x, y); } @@ -1540,10 +1532,9 @@ nr = min (nr, nrof); - nrof -= nr; - - if (nrof) + if (nrof > nr) { + nrof -= nr; adjust_weight (env, -weight * max (1, nr)); // carrying == 0 if (object *pl = visible_to ()) @@ -1553,7 +1544,7 @@ } else { - destroy (1); + destroy (); return false; } }