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

Comparing deliantra/server/common/arch.C (file contents):
Revision 1.74 by root, Sun Apr 20 05:24:55 2008 UTC vs.
Revision 1.77 by root, Wed Apr 30 08:29:31 2008 UTC

22 */ 22 */
23 23
24#include <cassert> 24#include <cassert>
25 25
26#include <global.h> 26#include <global.h>
27#include <funcpoint.h>
28#include <loader.h> 27#include <loader.h>
29 28
30#include <tr1/functional> 29#include <tr1/functional>
31#include <tr1/unordered_map> 30#include <tr1/unordered_map>
32 31
514 else 513 else
515 { 514 {
516 LOG (llevDebug, "garbage collect arch %s", at->debug_desc ()); 515 LOG (llevDebug, "garbage collect arch %s", at->debug_desc ());
517 assert (at->arch == at); // verify that refcnt == 1 is truely valid 516 assert (at->arch == at); // verify that refcnt == 1 is truely valid
518 allarch.erase (idx); 517 allarch.erase (idx);
518
519 // break chain
520 for (object *op = at->head_ (); op; )
521 {
522 object *next = op->more;
523 op->head = 0;
524 op->more = 0;
525 op = next;
526 }
527
528 at->destroy ();
519 at->arch = 0; 529 at->arch = 0;
520 at->more = 0;
521 at->destroy ();
522 } 530 }
523 } 531 }
524 while (--cnt); 532 while (--cnt);
525} 533}
526 534
586 return create_singularity (name); 594 return create_singularity (name);
587 595
588 return arch_to_object (at); 596 return arch_to_object (at);
589} 597}
590 598
599object *
600archetype::get (const char *name)
601{
602 return get_archetype (name);
603}
604
591/* 605/*
592 * Returns the first archetype using the given type. 606 * Returns the first archetype using the given type.
593 * Used in treasure-generation. 607 * Used in treasure-generation.
594 */ 608 */
595archetype * 609archetype *

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines