--- deliantra/server/common/arch.C 2006/12/12 21:39:56 1.29 +++ deliantra/server/common/arch.C 2006/12/13 03:28:42 1.31 @@ -389,7 +389,7 @@ archetype::archetype () { - clear_object (&clone); /* to initial state other also */ + clone.clear (); /* to initial state other also */ 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 = object::create (); - at->clone.copy_to (op); + op = at->clone.clone (); op->arch = at; op->instantiate (); return op; @@ -808,16 +807,14 @@ clone_arch (int type) { archetype *at; - object *op = object::create (); if ((at = type_to_archetype (type)) == NULL) { LOG (llevError, "Can't clone archetype %d\n", type); - op->destroy (); - return NULL; + return 0; } - at->clone.copy_to (op); + object *op = at->clone.clone (); op->instantiate (); return op; }