ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/arch.C
(Generate patch)

Comparing deliantra/server/common/arch.C (file contents):
Revision 1.29 by root, Tue Dec 12 21:39:56 2006 UTC vs.
Revision 1.30 by root, Wed Dec 13 00:42:03 2006 UTC

604 LOG (llevError, "Couldn't find archetype.\n"); 604 LOG (llevError, "Couldn't find archetype.\n");
605 605
606 return NULL; 606 return NULL;
607 } 607 }
608 608
609 op = object::create (); 609 op = at->clone.clone ();
610 at->clone.copy_to (op);
611 op->arch = at; 610 op->arch = at;
612 op->instantiate (); 611 op->instantiate ();
613 return op; 612 return op;
614} 613}
615 614
806 805
807object * 806object *
808clone_arch (int type) 807clone_arch (int type)
809{ 808{
810 archetype *at; 809 archetype *at;
811 object *op = object::create ();
812 810
813 if ((at = type_to_archetype (type)) == NULL) 811 if ((at = type_to_archetype (type)) == NULL)
814 { 812 {
815 LOG (llevError, "Can't clone archetype %d\n", type); 813 LOG (llevError, "Can't clone archetype %d\n", type);
816 op->destroy ();
817 return NULL; 814 return 0;
818 } 815 }
819 816
820 at->clone.copy_to (op); 817 object *op = at->clone.clone ();
821 op->instantiate (); 818 op->instantiate ();
822 return op; 819 return op;
823} 820}
824 821
825/* 822/*

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines