--- deliantra/server/common/object.C 2006/12/19 15:30:01 1.72 +++ deliantra/server/common/object.C 2006/12/20 01:19:11 1.73 @@ -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; } }