--- deliantra/server/common/arch.C 2006/12/09 14:01:12 1.27 +++ deliantra/server/common/arch.C 2006/12/13 00:42:03 1.30 @@ -390,7 +390,7 @@ archetype::archetype () { clear_object (&clone); /* to initial state other also */ - CLEAR_FLAG (&clone, FLAG_FREED); /* This shouldn't matter, since copy_object() */ + CLEAR_FLAG (&clone, FLAG_FREED); /* This shouldn't matter, since copy_to */ SET_FLAG (&clone, FLAG_REMOVED); /* doesn't copy these flags... */ } @@ -606,8 +606,7 @@ return NULL; } - op = get_object (); - copy_object (&at->clone, op); + op = at->clone.clone (); op->arch = at; op->instantiate (); return op; @@ -627,7 +626,7 @@ char buf[MAX_BUF]; sprintf (buf, "%s (%s)", ARCH_SINGULARITY, name); - op = get_object (); + op = object::create (); op->name = op->name_pl = buf; SET_FLAG (op, FLAG_NO_PICK); return op; @@ -808,16 +807,14 @@ clone_arch (int type) { archetype *at; - object *op = get_object (); if ((at = type_to_archetype (type)) == NULL) { LOG (llevError, "Can't clone archetype %d\n", type); - free_object (op); - return NULL; + return 0; } - copy_object (&at->clone, op); + object *op = at->clone.clone (); op->instantiate (); return op; }