--- deliantra/server/common/object.C 2006/12/19 13:41:45 1.71 +++ deliantra/server/common/object.C 2006/12/20 01:19:11 1.73 @@ -1146,7 +1146,7 @@ && ((move_type & tmp->move_off) && (move_type & ~tmp->move_off & ~tmp->move_block) == 0)) { - move_apply (tmp, this, 0, false); + move_apply (tmp, this, 0); if (destroyed ()) LOG (llevError, "BUG: remove_ob(): name %s, destroyed leaving object\n", tmp->debug_desc ()); @@ -1616,7 +1616,7 @@ if (QUERY_FLAG (op, FLAG_REMOVED)) op->nrof -= i; - else if (op->env != NULL) + else if (op->env) { /* is this object in the players inventory, or sub container * therein? @@ -1632,11 +1632,10 @@ { for (pl = first_player; pl; pl = pl->next) if (pl->ob->container == op->env) - break; - if (pl) - tmp = pl->ob; - else - tmp = NULL; + { + tmp = pl->ob; + break; + } } if (i < op->nrof) @@ -1644,18 +1643,14 @@ sub_weight (op->env, op->weight * i); op->nrof -= i; if (tmp) - { - esrv_send_item (tmp, op); - } + esrv_send_item (tmp, op); } else { op->remove (); op->nrof = 0; if (tmp) - { - esrv_del_item (tmp->contr, op->count); - } + esrv_del_item (tmp->contr, op->count); } } else @@ -1671,7 +1666,7 @@ } /* Since we just removed op, op->above is null */ - for (tmp = above; tmp != NULL; tmp = tmp->above) + for (tmp = above; tmp; tmp = tmp->above) if (tmp->type == PLAYER) { if (op->nrof) @@ -1686,7 +1681,7 @@ else { op->destroy (); - return NULL; + return 0; } } @@ -1920,7 +1915,7 @@ if ((!op->move_type && tmp->move_on & MOVE_WALK) || ((op->move_type & tmp->move_on) && (op->move_type & ~tmp->move_on & ~tmp->move_block) == 0)) { - move_apply (tmp, op, originator, true); + move_apply (tmp, op, originator); if (op->destroyed ()) return 1;