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.26 by root, Fri Nov 17 19:40:53 2006 UTC vs.
Revision 1.28 by root, Tue Dec 12 20:53:02 2006 UTC

403 * of archetype-structures. 403 * of archetype-structures.
404 */ 404 */
405void 405void
406first_arch_pass (object_thawer & fp) 406first_arch_pass (object_thawer & fp)
407{ 407{
408 archetype *at, *head = NULL, *last_more = NULL; 408 archetype *head = 0, *last_more = 0;
409 409
410 archetype *at = new archetype;
410 at->clone.arch = first_archetype = at = new archetype; 411 at->clone.arch = first_archetype = at;
411 412
412 while (int i = load_object (fp, &at->clone, 0)) 413 while (int i = load_object (fp, &at->clone, 0))
413 { 414 {
414 at->clone.speed_left = (float) (-0.1); 415 at->clone.speed_left = (float) (-0.1);
415 /* copy the body_info to the body_used - this is only really 416 /* copy the body_info to the body_used - this is only really
810 object *op = get_object (); 811 object *op = get_object ();
811 812
812 if ((at = type_to_archetype (type)) == NULL) 813 if ((at = type_to_archetype (type)) == NULL)
813 { 814 {
814 LOG (llevError, "Can't clone archetype %d\n", type); 815 LOG (llevError, "Can't clone archetype %d\n", type);
815 free_object (op); 816 op->destroy (0);
816 return NULL; 817 return NULL;
817 } 818 }
818 819
819 copy_object (&at->clone, op); 820 copy_object (&at->clone, op);
820 op->instantiate (); 821 op->instantiate ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines