--- deliantra/server/common/loader.C 2006/11/07 14:58:35 1.20 +++ deliantra/server/common/loader.C 2006/12/15 19:59:19 1.23 @@ -28,7 +28,6 @@ #include #include -#include #include /* Maps the MOVE_* values to names */ @@ -558,7 +557,7 @@ tmp = arch_to_object (arch); else { - tmp = get_object (); + tmp = object::create (); /* record the name of the broken object */ tmp->name = str; } @@ -595,7 +594,7 @@ else { LOG (llevDebug, "Discarding object without arch: %s\n", tmp->name ? (const char *) tmp->name : "(null)"); - free_object (tmp); + tmp->destroy (); } } else @@ -603,8 +602,8 @@ /* This is the actual archetype definition then */ op->arch = archetype::find (str); - if (op->arch != NULL) - copy_object (&op->arch->clone, op); + if (op->arch) + op->arch->clone.copy_to (op); else if (!arch_init) /* record the name of the broken object */ op->name = str; @@ -1305,7 +1304,7 @@ } /* We don't need to worry about the arch's extra fields - they - * will get taken care of the copy_object function. + * will get taken care of the copy_to method. */ { @@ -1500,10 +1499,7 @@ } if (!(flag & 2)) - { - remove_ob (op); - free_object (op); - } + op->destroy (); fp.put (op); fprintf (fp, "end\n");