--- deliantra/server/common/map.C 2007/03/12 01:13:10 1.94 +++ deliantra/server/common/map.C 2007/03/17 22:11:22 1.98 @@ -456,7 +456,7 @@ bool maptile::_save_objects (object_freezer &f, int flags) { - static int cede_count = 0; + coroapi::cede (); if (flags & IO_HEADER) _save_header (f); @@ -466,7 +466,9 @@ for (int i = 0; i < size (); ++i) { -#if 0 // temporarily disabled for improved(?) stability, schmorp #TODO#d#//D +#if 0 // disabled, there still seem to be races somewhere + static int cede_count = 0; + if (cede_count >= 500) { cede_count = 0; @@ -477,8 +479,10 @@ int unique = 0; for (object *op = spaces [i].bot; op; op = op->above) { +#if 0 // count per-object, but cede only when modification-safe cede_count++; +#endif if (op->flag [FLAG_UNIQUE] && op->flag [FLAG_IS_FLOOR]) unique = 1; @@ -496,6 +500,8 @@ } } + coroapi::cede (); + return true; } @@ -1083,9 +1089,9 @@ //object *top = 0; //object *floor = 0; // this seems to generate better code than using locals, above - object *&top = faces_obj[0]; - object *&middle = faces_obj[1]; - object *&floor = faces_obj[2]; + object *&top = faces_obj[0] = 0; + object *&middle = faces_obj[1] = 0; + object *&floor = faces_obj[2] = 0; for (tmp = bot; tmp; last = tmp, tmp = tmp->above) {