summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tags.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-20 13:37:58 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-20 13:37:58 +0000
commitdc59d2025591002a2ebaedcdb59540afbed1ce44 (patch)
treefb2a434619b8b64454411572c78988e7fa24443e /crawl-ref/source/tags.cc
parent327c313f2b43ee129b1f9c7b0bf74535f86e726b (diff)
downloadcrawl-ref-dc59d2025591002a2ebaedcdb59540afbed1ce44.tar.gz
crawl-ref-dc59d2025591002a2ebaedcdb59540afbed1ce44.zip
Fix "Unlinked temporary item" messages when a game is saved and restored, since
otherwise they just get on your nerves. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8625 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tags.cc')
-rw-r--r--crawl-ref/source/tags.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
index fde326b19b..b87d6cb184 100644
--- a/crawl-ref/source/tags.cc
+++ b/crawl-ref/source/tags.cc
@@ -2120,6 +2120,18 @@ static void tag_read_level_items(reader &th, char minorVersion)
const int item_count = unmarshallShort(th);
for (int i = 0; i < item_count; ++i)
unmarshallItem(th, mitm[i]);
+
+#if DEBUG_ITEM_SCAN
+ // There's no way to fix this, even with wizard commands, so get
+ // rid of it when restoring the game.
+ for (int i = 0; i < MAX_ITEMS; i++)
+ {
+ item_def &item(mitm[i]);
+
+ if (item.pos.origin())
+ item.clear();
+ }
+#endif
}
static void unmarshall_monster(reader &th, monsters &m)