From dc59d2025591002a2ebaedcdb59540afbed1ce44 Mon Sep 17 00:00:00 2001 From: zelgadis Date: Tue, 20 Jan 2009 13:37:58 +0000 Subject: 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 --- crawl-ref/source/tags.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'crawl-ref/source/tags.cc') 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) -- cgit v1.2.3-54-g00ecf