… | |
… | |
2477 | for (int x = 0; x < THIS->width; ++x) |
2477 | for (int x = 0; x < THIS->width; ++x) |
2478 | for (int y = 0; y < THIS->height; ++y) |
2478 | for (int y = 0; y < THIS->height; ++y) |
2479 | { |
2479 | { |
2480 | region *rgn = THIS->region (x, y); |
2480 | region *rgn = THIS->region (x, y); |
2481 | |
2481 | |
2482 | //fprintf (stderr, "%d,%d %f %p\n", x, y, rgn->treasure_density,rgn->treasure);//D |
|
|
2483 | if (object *op = THIS->at (x, y).top) |
2482 | if (object *op = THIS->at (x, y).top) |
2484 | if (rgn->treasure && rndm () < rgn->treasure_density) |
2483 | if (rgn->treasure && rndm () < rgn->treasure_density) |
2485 | create_treasure (rgn->treasure, op, GT_ENVIRONMENT, THIS->difficulty); |
2484 | create_treasure (rgn->treasure, op, GT_ENVIRONMENT, THIS->difficulty); |
2486 | } |
2485 | } |
2487 | |
2486 | |