--- deliantra/server/common/object.C 2006/09/16 22:24:12 1.49 +++ deliantra/server/common/object.C 2006/09/27 00:36:08 1.52 @@ -913,7 +913,7 @@ static int lastmortals = 0;//D - if (mortals.size() != lastmortals)//D + if (mortals.size() != lastmortals && lastmortals > 100)//D { lastmortals = mortals.size ();//D LOG (llevDebug, "%d objects in mortal queue\n", lastmortals);//D @@ -974,10 +974,10 @@ * The object must have been removed by remove_ob() first for * this function to succeed. * - * If free_inventory is set, free inventory as well. Else drop items in + * If destroy_inventory is set, free inventory as well. Else drop items in * inventory to the ground. */ -void object::free (bool free_inventory) +void object::destroy (bool destroy_inventory) { if (QUERY_FLAG (this, FLAG_FREED)) return; @@ -992,7 +992,7 @@ if (more) { - more->free (free_inventory); + more->destroy (destroy_inventory); more = 0; } @@ -1002,14 +1002,14 @@ * if some form of movement is allowed, let objects * drop on that space. */ - if (free_inventory || !map || map->in_memory != MAP_IN_MEMORY || GET_MAP_MOVE_BLOCK (map, x, y) == MOVE_ALL) + if (destroy_inventory || !map || map->in_memory != MAP_IN_MEMORY || GET_MAP_MOVE_BLOCK (map, x, y) == MOVE_ALL) { object *op = inv; while (op) { object *tmp = op->below; - op->free (free_inventory); + op->destroy (destroy_inventory); op = tmp; } } @@ -1043,6 +1043,9 @@ enemy = 0; attacked_by = 0; + // only relevant for players(?), but make sure of it anyways + contr = 0; + /* Remove object from the active list */ speed = 0; update_ob_speed (this); @@ -1215,12 +1218,14 @@ } /* See if player moving off should effect something */ - if (check_walk_off && ((op->move_type & tmp->move_off) && (op->move_type & ~tmp->move_off & ~tmp->move_block) == 0)) + if (check_walk_off + && ((op->move_type & tmp->move_off) + && (op->move_type & ~tmp->move_off & ~tmp->move_block) == 0)) { move_apply (tmp, op, NULL); - if (op->destroyed ()); - LOG (llevError, "BUG: remove_ob(): name %s, archname %s destroyed " "leaving object\n", &tmp->name, &tmp->arch->name); + if (op->destroyed ()) + LOG (llevError, "BUG: remove_ob(): name %s, destroyed leaving object\n", tmp->debug_desc ()); } /* Eneq(@csd.uu.se): Fixed this to skip tmp->above=tmp */