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

Comparing deliantra/server/common/holy.C (file contents):
Revision 1.10 by root, Mon May 28 21:21:40 2007 UTC vs.
Revision 1.11 by root, Mon Jun 4 13:04:00 2007 UTC

51void 51void
52init_gods (void) 52init_gods (void)
53{ 53{
54 LOG (llevDebug, "Initialising gods...\n"); 54 LOG (llevDebug, "Initialising gods...\n");
55 55
56 for (archetype *at = first_archetype; at; at = at->next) 56 for_all_archetypes (at)
57 if (at->clone.type == GOD) 57 if (at->type == GOD)
58 add_god_to_list (at); 58 add_god_to_list (at);
59 59
60 LOG (llevDebug, "done.\n"); 60 LOG (llevDebug, "done.\n");
61} 61}
62 62
73 } 73 }
74 74
75 god = init_godslist (); 75 god = init_godslist ();
76 76
77 god->arch = god_arch; 77 god->arch = god_arch;
78 god->name = god_arch->clone.name; 78 god->name = god_arch->object::name;
79 if (!first_god) 79 if (!first_god)
80 god->id = 1; 80 god->id = 1;
81 else 81 else
82 { 82 {
83 god->id = first_god->id + 1; 83 god->id = first_god->id + 1;
109 { 109 {
110 LOG (llevError, "baptise_altar(): bizarre nameless god!\n"); 110 LOG (llevError, "baptise_altar(): bizarre nameless god!\n");
111 return 0; 111 return 0;
112 } 112 }
113 /* if the object name hasnt' been changed, we tack on the gods name */ 113 /* if the object name hasnt' been changed, we tack on the gods name */
114 if (!strcmp (op->name, op->arch->clone.name)) 114 if (!strcmp (op->name, op->arch->object::name))
115 { 115 {
116 sprintf (buf, "%s of %s", &op->name, &god->name); 116 sprintf (buf, "%s of %s", &op->name, &god->name);
117 op->name = buf; 117 op->name = buf;
118 } 118 }
119 op->title = god->name; 119 op->title = god->name;
144 * are returning a pointer to the CLONE object. -b.t. 144 * are returning a pointer to the CLONE object. -b.t.
145 */ 145 */
146object * 146object *
147pntr_to_god_obj (godlink *godlnk) 147pntr_to_god_obj (godlink *godlnk)
148{ 148{
149 object *god = NULL;
150
151 if (godlnk && godlnk->arch) 149 return godlnk && godlnk->arch
152 god = &godlnk->arch->clone; 150 ? godlnk->arch
153 return god; 151 : 0;
154} 152}
155 153
156void 154void
157free_all_god (void) 155free_all_god (void)
158{ 156{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines