--- deliantra/server/common/holy.C 2007/01/02 23:39:21 1.6 +++ deliantra/server/common/holy.C 2007/04/16 06:23:39 1.8 @@ -28,10 +28,9 @@ void init_gods (void) { - archetype *at = NULL; - LOG (llevDebug, "Initialising gods...\n"); - for (at = first_archetype; at != NULL; at = at->next) + + for (archetype *at = first_archetype; at; at = at->next) if (at->clone.type == GOD) add_god_to_list (at); @@ -107,12 +106,13 @@ int i; if (god) - for (i = RANDOM () % (god->id) + 1; god; god = god->next) + for (i = rndm (god->id) + 1; god; god = god->next) if (god->id == i) break; if (!god) LOG (llevError, "get_rand_god(): can't find a random god!\n"); + return god; }