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.120 by root, Thu Sep 11 12:43:17 2008 UTC vs.
Revision 1.123 by root, Mon Sep 29 10:32:50 2008 UTC

560 case KW_race: f.get_ornull (race); break; 560 case KW_race: f.get_ornull (race); break;
561 case KW_slaying: f.get_ornull (slaying); break; 561 case KW_slaying: f.get_ornull (slaying); break;
562 case KW_tag: f.get_ornull (tag); break; 562 case KW_tag: f.get_ornull (tag); break;
563 563
564 case KW_arch: 564 case KW_arch:
565 {
566 object *tmp = object::read (f); 565 if (object *tmp = object::read (f))
567 tmp->deactivate ();
568
569 { 566 {
567 tmp->deactivate ();
568
570 // was: insert_ob_in_ob (tmp, op); 569 // was: insert_ob_in_ob (tmp, op);
571 // but manually adding it can improve map loading times a lot 570 // but manually adding it can improve map loading times a lot
572 // also, appending instead of prepending keeps the 571 // also, appending instead of prepending keeps the
573 // save ordering the same between repeated load/saves. 572 // save ordering the same between repeated load/saves.
574 // and finally we do not want any funny effects 573 // and finally we do not want any funny effects
591 590
592 tmp->below = 0; 591 tmp->below = 0;
593 tmp->env = this; 592 tmp->env = this;
594 op_inv = tmp; 593 op_inv = tmp;
595 } 594 }
596 } 595 else
596 LOG (llevError, "ERROR: couldn't load inventory object, file corrupted?\n");
597
597 continue; 598 continue;
598 599
599 case KW_other_arch: 600 case KW_other_arch:
600 if (loading_arch == this) 601 if (loading_arch == this)
601 archetype::postpone_arch_ref (loading_arch->other_arch, f.get_str ()); 602 archetype::postpone_arch_ref (loading_arch->other_arch, f.get_str ());
1058 // instance() activates, this should be fixed properly 1059 // instance() activates, this should be fixed properly
1059 op->deactivate (); 1060 op->deactivate ();
1060 1061
1061 if (!op->parse_kv (f)) 1062 if (!op->parse_kv (f))
1062 { 1063 {
1063 op->destroy (true); 1064 op->destroy ();
1064 return 0; 1065 return 0;
1065 } 1066 }
1066 1067
1067 op->post_load_check (); 1068 op->post_load_check ();
1068 return op; 1069 return op;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines