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

Comparing deliantra/server/random_maps/special.C (file contents):
Revision 1.14 by root, Thu Jan 11 00:41:08 2007 UTC vs.
Revision 1.15 by root, Mon Jan 15 15:54:19 2007 UTC

168 168
169 while (i < 0 && tries < 10) 169 while (i < 0 && tries < 10)
170 { 170 {
171 ix = RANDOM () % (map->width - 2) + 1; 171 ix = RANDOM () % (map->width - 2) + 1;
172 iy = RANDOM () % (map->height - 2) + 1; 172 iy = RANDOM () % (map->height - 2) + 1;
173 i = find_first_free_spot (fountain, map, ix, iy); 173 i = find_free_spot (fountain, map, ix, iy, 1, SIZEOFFREE1 + 1);
174 tries++; 174 tries++;
175 } 175 }
176 176
177 if (i == -1) 177 if (i == -1)
178 { /* can't place fountain */ 178 { /* can't place fountain */
192 potion->material = M_ADAMANT; 192 potion->material = M_ADAMANT;
193 fountain->x = ix; 193 fountain->x = ix;
194 fountain->y = iy; 194 fountain->y = iy;
195 insert_ob_in_map (fountain, map, NULL, 0); 195 insert_ob_in_map (fountain, map, NULL, 0);
196 insert_ob_in_map (potion, map, NULL, 0); 196 insert_ob_in_map (potion, map, NULL, 0);
197
198} 197}
199 198
200void 199void
201place_special_exit (maptile *map, int hole_type, random_map_params *RP) 200place_special_exit (maptile *map, int hole_type, random_map_params *RP)
202{ 201{
214 213
215 while (i < 0) 214 while (i < 0)
216 { 215 {
217 ix = RANDOM () % (map->width - 2) + 1; 216 ix = RANDOM () % (map->width - 2) + 1;
218 iy = RANDOM () % (map->height - 2) + 1; 217 iy = RANDOM () % (map->height - 2) + 1;
219 i = find_first_free_spot (the_exit, map, ix, iy); 218 i = find_free_spot (the_exit, map, ix, iy, 1, SIZEOFFREE1 + 1);
220 } 219 }
221 220
222 ix += freearr_x[i]; 221 ix += freearr_x[i];
223 iy += freearr_y[i]; 222 iy += freearr_y[i];
224 the_exit->x = ix; 223 the_exit->x = ix;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines