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

Comparing deliantra/server/common/loader.C (file contents):
Revision 1.32 by elmex, Sat Dec 30 21:07:46 2006 UTC vs.
Revision 1.33 by root, Sun Dec 31 17:17:22 2006 UTC

540 case KW_slaying: thawer.get_ornull (op->slaying); break; 540 case KW_slaying: thawer.get_ornull (op->slaying); break;
541 541
542 case KW_arch: 542 case KW_arch:
543 { 543 {
544 const char *str = thawer.get_str (); 544 const char *str = thawer.get_str ();
545 fprintf (stderr, "arch %s\n", str);//D
545 546
546 if (op->arch) 547 if (op->arch)
547 { 548 {
548 /* If op->arch has been set, then this new object 549 /* If op->arch has been set, then this new object
549 * must be part of the inventory. So process 550 * must be part of the inventory. So process
551 */ 552 */
552 archetype *arch = archetype::find (str); 553 archetype *arch = archetype::find (str);
553 554
554 object *tmp; 555 object *tmp;
555 556
556 if (arch != NULL) 557 if (arch)
557 tmp = arch_to_object (arch); 558 tmp = arch_to_object (arch);
558 else 559 else
559 { 560 {
560 tmp = object::create (); 561 tmp = object::create ();
561 /* record the name of the broken object */ 562 /* record the name of the broken object */
563 } 564 }
564 565
565 // decativate the object we, as we are still going 566 // decativate the object we, as we are still going
566 // to read the speed value. Objects should be activated 567 // to read the speed value. Objects should be activated
567 // when the map, object or player is completly loaded. 568 // when the map, object or player is completly loaded.
568 tmp->deactivate (false); 569 tmp->deactivate ();
569 570
570 parse_object (tmp, thawer, map_flags); 571 parse_object (tmp, thawer, map_flags);
571 572
572 if (tmp->arch) 573 if (tmp->arch)
573 { 574 {
606 { 607 {
607 /* This is the actual archetype definition then */ 608 /* This is the actual archetype definition then */
608 op->arch = archetype::find (str); 609 op->arch = archetype::find (str);
609 610
610 if (op->arch) 611 if (op->arch)
612 {
611 op->arch->clone.copy_to (op); 613 op->arch->clone.copy_to (op);
614 // copy_to activates, this should be fixed properly
615 op->deactivate ();
616 }
612 else if (!arch_init) 617 else if (!arch_init)
613 /* record the name of the broken object */ 618 /* record the name of the broken object */
614 op->name = str; 619 op->name = str;
615 } 620 }
616 } 621 }
1466 1471
1467 for (object *tmp = op->inv; tmp; tmp = tmp->below) 1472 for (object *tmp = op->inv; tmp; tmp = tmp->below)
1468 save_object (fp, tmp, flag); 1473 save_object (fp, tmp, flag);
1469 1474
1470 fp.put (op); 1475 fp.put (op);
1471 fp.put (KW_end, 0); 1476 fp.put (KW_end);
1472} 1477}
1473 1478

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines