--- deliantra/server/common/object.C 2008/05/18 19:53:07 1.245 +++ deliantra/server/common/object.C 2008/07/16 14:29:40 1.250 @@ -188,10 +188,6 @@ || ob1->name != ob2->name) return 0; - // some objects are unmergable - if (!ob1->nrof || !ob2->nrof) - return 0; - /* Do not merge objects if nrof would overflow. First part checks * for unsigned overflow (2c), second part checks whether the result * would fit into a 32 bit signed int, which is often used to hold @@ -351,7 +347,8 @@ // maybe there is a player standing on the same mapspace // this will catch the case where "this" is a player if (object *pl = ms ().player ()) - if (!pl->container || this == pl->container) + if ((!pl->container && pl->contr->ns && !pl->contr->ns->update_look) + || this == pl->container) return pl; } } @@ -915,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 */ @@ -1547,7 +1541,7 @@ if (nrof) { - adjust_weight (env, -weight * nr); // carrying == 0 + adjust_weight (env, -weight * max (1, nr)); // carrying == 0 if (object *pl = visible_to ()) esrv_update_item (UPD_NROF, pl, this); @@ -1556,7 +1550,7 @@ } else { - destroy (1); + destroy (); return false; } }