--- deliantra/server/common/arch.C 2006/12/12 20:53:02 1.28 +++ deliantra/server/common/arch.C 2007/01/03 00:10:04 1.34 @@ -389,8 +389,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... */ } @@ -578,7 +577,8 @@ LOG (llevDebug, " loading treasure...\n"); load_treasures (); - LOG (llevDebug, " done\n arch-pass 2...\n"); + LOG (llevDebug, " done\n"); + LOG (llevDebug, " arch-pass 2...\n"); second_arch_pass (thawer); LOG (llevDebug, " done\n"); #ifdef DEBUG @@ -592,7 +592,6 @@ * Creates and returns a new object which is a copy of the given archetype. * This function returns NULL on failure. */ - object * arch_to_object (archetype *at) { @@ -606,8 +605,7 @@ return NULL; } - op = get_object (); - copy_object (&at->clone, op); + op = at->clone.clone (); op->arch = at; op->instantiate (); return op; @@ -619,7 +617,6 @@ * Thus get_archetype() will be guaranteed to always return * an object, and never NULL. */ - object * create_singularity (const char *name) { @@ -627,7 +624,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; @@ -637,7 +634,6 @@ * Finds which archetype matches the given name, and returns a new * object containing a copy of the archetype. */ - object * get_archetype (const char *name) { @@ -808,16 +804,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); - op->destroy (0); - return NULL; + return 0; } - copy_object (&at->clone, op); + object *op = at->clone.clone (); op->instantiate (); return op; }