diff options
author | Neil Moore <neil@s-z.org> | 2012-07-06 13:57:13 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2012-07-06 13:57:13 -0400 |
commit | 1999034cde46cf2d91178cd9cd31ebe0bd955616 (patch) | |
tree | afaea790a3129ddd1dddbaf7a5db4a44bc30487a /crawl-ref/source/stash.h | |
parent | f5771d8f0ff0e3f460a7cca56af41dfac01e3397 (diff) | |
download | crawl-ref-1999034cde46cf2d91178cd9cd31ebe0bd955616.tar.gz crawl-ref-1999034cde46cf2d91178cd9cd31ebe0bd955616.zip |
Don't double tops of stacks.
We now track in the stash whether we saw a stack, even if we only saw
the top item. On update, we add the top item if it differs from the
remembered old items, or if we noticed a change from not-a-stack to a
stack. Previously, the second condition also triggered if we remembered
only a single item of the stack, which would lead to that item being
added to the stash again.
Fixes #5850. Stacks in old saves will continue to exhibit duplication
until they are verified by visiting the square.
Diffstat (limited to 'crawl-ref/source/stash.h')
-rw-r--r-- | crawl-ref/source/stash.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crawl-ref/source/stash.h b/crawl-ref/source/stash.h index 58bc6097b6..f5ca23fd28 100644 --- a/crawl-ref/source/stash.h +++ b/crawl-ref/source/stash.h @@ -97,6 +97,7 @@ private: trap_type trap; std::vector<item_def> items; + bool is_stack; static bool are_items_same(const item_def &, const item_def &); |