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

Comparing deliantra/server/common/map.C (file contents):
Revision 1.98 by root, Sat Mar 17 22:11:22 2007 UTC vs.
Revision 1.99 by root, Mon Apr 16 06:23:39 2007 UTC

344} 344}
345 345
346/* link_multipart_objects go through all the objects on the map looking 346/* link_multipart_objects go through all the objects on the map looking
347 * for objects whose arch says they are multipart yet according to the 347 * for objects whose arch says they are multipart yet according to the
348 * info we have, they only have the head (as would be expected when 348 * info we have, they only have the head (as would be expected when
349 * they are saved). We do have to look for the old maps that did save 349 * they are saved).
350 * the more sections and not re-add sections for them.
351 */ 350 */
352void 351void
353maptile::link_multipart_objects () 352maptile::link_multipart_objects ()
354{ 353{
355 if (!spaces) 354 if (!spaces)
464 if (!spaces) 463 if (!spaces)
465 return false; 464 return false;
466 465
467 for (int i = 0; i < size (); ++i) 466 for (int i = 0; i < size (); ++i)
468 { 467 {
469#if 0 // disabled, there still seem to be races somewhere
470 static int cede_count = 0;
471
472 if (cede_count >= 500)
473 {
474 cede_count = 0;
475 coroapi::cede ();
476 }
477#endif
478
479 int unique = 0; 468 int unique = 0;
480 for (object *op = spaces [i].bot; op; op = op->above) 469 for (object *op = spaces [i].bot; op; op = op->above)
481 { 470 {
482#if 0
483 // count per-object, but cede only when modification-safe
484 cede_count++;
485#endif
486
487 if (op->flag [FLAG_UNIQUE] && op->flag [FLAG_IS_FLOOR]) 471 if (op->flag [FLAG_UNIQUE] && op->flag [FLAG_IS_FLOOR])
488 unique = 1; 472 unique = 1;
489 473
490 if (!op->can_map_save ()) 474 if (!op->can_map_save ())
491 continue; 475 continue;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines