--- deliantra/server/common/object.C 2006/09/14 00:07:15 1.40 +++ deliantra/server/common/object.C 2006/09/14 01:12:28 1.41 @@ -929,6 +929,7 @@ ++i; // further delay freeing else { + //printf ("free_mortal(%p,%ld,%ld)\n", *i, pticks, (*i)->count);//D //freed.push_back (*i);//D delete *i; mortals.erase (i); @@ -955,6 +956,7 @@ void object::link () { count = ++ob_count; + uuid = gen_uuid (); prev = 0; next = objects; @@ -967,24 +969,18 @@ void object::unlink () { - count = 0; - uuid = gen_uuid (); + //count = 0;//D + if (!prev && !next) return;//D if (this == objects) objects = next; /* Remove this object from the list of used objects */ - if (prev) - { - prev->next = next; - prev = 0; - } + if (prev) prev->next = next; + if (next) next->prev = prev; - if (next) - { - next->prev = prev; - next = 0; - } + prev = 0; + next = 0; } object *object::create () @@ -1029,6 +1025,8 @@ SET_FLAG (this, FLAG_FREED); + //printf ("free(%p,%ld,%ld)\n", this, pticks, count);//D + if (more) { more->free (free_inventory); @@ -2737,7 +2735,8 @@ { LOG (llevError, "Error - Unable to access load object temp file\n"); return NULL; - }; + } + fprintf (tempfile, obstr); fclose (tempfile);