summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/makeitem.cc
diff options
context:
space:
mode:
authorreaverb <reaverb.Crawl@gmail.com>2014-08-08 03:46:43 -0400
committerreaverb <reaverb.Crawl@gmail.com>2014-08-08 15:00:27 -0400
commit8ce947975fa9f9c0b3d8575ab43ff042c5d6b872 (patch)
tree1feedea147c1a4eeaa9df707cd1aaffcb6651987 /crawl-ref/source/makeitem.cc
parenta9cc7087be67d9be82e49097f49ff3abee4ddc9a (diff)
downloadcrawl-ref-8ce947975fa9f9c0b3d8575ab43ff042c5d6b872.tar.gz
crawl-ref-8ce947975fa9f9c0b3d8575ab43ff042c5d6b872.zip
Move item placement code from items() to the only place it is used
Diffstat (limited to 'crawl-ref/source/makeitem.cc')
-rw-r--r--crawl-ref/source/makeitem.cc22
1 files changed, 1 insertions, 21 deletions
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index 3e39a602f4..9a3c06c5ee 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -2853,27 +2853,7 @@ int items(bool allow_uniques,
item.link = NON_ITEM;
}
else
- {
- coord_def itempos;
- bool found = false;
- for (int i = 0; i < 500 && !found; ++i)
- {
- itempos = random_in_bounds();
- const monster* mon = monster_at(itempos);
- found = grd(itempos) == DNGN_FLOOR
- && !map_masked(itempos, mapmask)
- // oklobs or statues are ok
- && (!mon || !mons_is_firewood(mon));
- }
- if (!found)
- {
- // Couldn't find a single good spot!
- destroy_item(p);
- return NON_ITEM;
- }
- move_item_to_grid(&p, itempos);
- }
-
+ die("dont_place is used outside dungeon.cc oops");
// Note that item might be invalidated now, since p could have changed.
ASSERT(mitm[p].is_valid());
return p;