--- deliantra/server/common/loader.C 2006/12/30 21:07:46 1.32 +++ deliantra/server/common/loader.C 2007/01/01 21:19:51 1.36 @@ -553,7 +553,7 @@ object *tmp; - if (arch != NULL) + if (arch) tmp = arch_to_object (arch); else { @@ -565,7 +565,7 @@ // decativate the object we, as we are still going // to read the speed value. Objects should be activated // when the map, object or player is completly loaded. - tmp->deactivate (false); + tmp->deactivate (); parse_object (tmp, thawer, map_flags); @@ -608,7 +608,11 @@ op->arch = archetype::find (str); if (op->arch) - op->arch->clone.copy_to (op); + { + op->arch->clone.copy_to (op); + // copy_to activates, this should be fixed properly + op->deactivate (); + } else if (!arch_init) /* record the name of the broken object */ op->name = str; @@ -1055,17 +1059,7 @@ int load_object (object_thawer &fp, object *op, int map_flags) { - // cede every 500 objects loaded - { - static int cede_counter = 0; - - if (++cede_counter >= 500) - { - cede_counter = 0; - if (coroapi::nready ()) - coroapi::cede (); - } - } + coroapi::cede_every (1000); // cede once in a while return parse_object (op, fp, map_flags); } @@ -1468,6 +1462,6 @@ save_object (fp, tmp, flag); fp.put (op); - fp.put (KW_end, 0); + fp.put (KW_end); }