--- deliantra/server/random_maps/treasure.C 2007/01/18 00:06:56 1.20 +++ deliantra/server/random_maps/treasure.C 2007/01/18 19:42:10 1.21 @@ -82,7 +82,7 @@ /* filter out the mutually exclusive options */ if ((treasureoptions & RICH) && (treasureoptions & SPARSE)) { - if (RANDOM () % 2) + if (rndm (2)) treasureoptions -= 1; else treasureoptions -= 2; @@ -465,7 +465,7 @@ } /* now search all the 8 squares around recursively for a monster,in random order */ - for (i = RANDOM () % 8, j = 0; j < 8 && theMonsterToFind == NULL; i++, j++) + for (i = rndm (8), j = 0; j < 8 && theMonsterToFind == NULL; i++, j++) { theMonsterToFind = find_monster_in_room_recursive (layout, map, x + freearr_x[i % 8 + 1], y + freearr_y[i % 8 + 1], RP); if (theMonsterToFind != NULL) @@ -538,7 +538,7 @@ number_of_free_spots_in_room++; /* now search all the 8 squares around recursively for free spots,in random order */ - for (i = RANDOM () % 8, j = 0; j < 8 && theMonsterToFind == NULL; i++, j++) + for (i = rndm (8), j = 0; j < 8 && theMonsterToFind == NULL; i++, j++) find_spot_in_room_recursive (layout, x + freearr_x[i % 8 + 1], y + freearr_y[i % 8 + 1], RP); } @@ -777,7 +777,7 @@ { layout[x][y] = 1; /* now search all the 8 squares around recursively for free spots,in random order */ - for (i = RANDOM () % 8, j = 0; j < 8 && theMonsterToFind == NULL; i++, j++) + for (i = rndm (8), j = 0; j < 8 && theMonsterToFind == NULL; i++, j++) find_doors_in_room_recursive (layout, map, x + freearr_x[i % 8 + 1], y + freearr_y[i % 8 + 1], doorlist, ndoors, RP); } }