--- deliantra/server/common/map.C 2007/03/15 14:23:02 1.96 +++ deliantra/server/common/map.C 2007/04/17 10:06:32 1.100 @@ -346,8 +346,7 @@ /* link_multipart_objects go through all the objects on the map looking * for objects whose arch says they are multipart yet according to the * info we have, they only have the head (as would be expected when - * they are saved). We do have to look for the old maps that did save - * the more sections and not re-add sections for them. + * they are saved). */ void maptile::link_multipart_objects () @@ -401,7 +400,7 @@ { for (;;) { - coroapi::cede_every (1000); // cede once in a while + coroapi::cede_to_tick_every (100); // cede once in a while switch (f.kw) { @@ -456,7 +455,7 @@ bool maptile::_save_objects (object_freezer &f, int flags) { - static int cede_count = 0; + coroapi::cede_to_tick (); if (flags & IO_HEADER) _save_header (f); @@ -466,18 +465,9 @@ for (int i = 0; i < size (); ++i) { - if (cede_count >= 500) - { - cede_count = 0; - coroapi::cede (); - } - int unique = 0; for (object *op = spaces [i].bot; op; op = op->above) { - // count per-object, but cede only when modification-safe - cede_count++; - if (op->flag [FLAG_UNIQUE] && op->flag [FLAG_IS_FLOOR]) unique = 1; @@ -494,6 +484,8 @@ } } + coroapi::cede_to_tick (); + return true; }