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

Comparing deliantra/server/random_maps/treasure.C (file contents):
Revision 1.14 by pippijn, Sat Jan 6 14:42:30 2007 UTC vs.
Revision 1.15 by root, Mon Jan 15 01:50:33 2007 UTC

369 { 369 {
370 kx = (RANDOM () % (RP->Xsize - 2)) + 1; 370 kx = (RANDOM () % (RP->Xsize - 2)) + 1;
371 ky = (RANDOM () % (RP->Ysize - 2)) + 1; 371 ky = (RANDOM () % (RP->Ysize - 2)) + 1;
372 freeindex = find_first_free_spot (the_key, map, kx, ky); 372 freeindex = find_first_free_spot (the_key, map, kx, ky);
373 } 373 }
374
374 if (freeindex != -1) 375 if (freeindex != -1)
375 { 376 {
376 kx += freearr_x[freeindex]; 377 kx += freearr_x[freeindex];
377 ky += freearr_y[freeindex]; 378 ky += freearr_y[freeindex];
378 } 379 }
384 NO_PASS_DOORS is set. */ 385 NO_PASS_DOORS is set. */
385 if (n_keys == 1) 386 if (n_keys == 1)
386 { 387 {
387 if (wall_blocked (map, x, y)) 388 if (wall_blocked (map, x, y))
388 return 0; 389 return 0;
390
389 the_keymaster = find_monster_in_room (map, x, y, RP); 391 the_keymaster = find_monster_in_room (map, x, y, RP);
390 if (the_keymaster == NULL) /* if fail, find a spot to drop the key. */ 392 if (the_keymaster == NULL) /* if fail, find a spot to drop the key. */
391 find_spot_in_room (map, x, y, &kx, &ky, RP); 393 find_spot_in_room (map, x, y, &kx, &ky, RP);
392 } 394 }
393 else 395 else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines