fix 'D' vs obj->bypass

Reported by entrez:  dropping items with the 'D' command sets
obj->bypass which prevents an otherwise compatible item from merging
with non-bypass floor stack.

'D' sets the bypass bit to avoid trouble if a dropped item triggers
an explosion that destroys some of inventory (making straightforward
invent traversal be unreliable).  Having bypass set prevented merging
with a floor stack that had that flag bit clear.  That was very
noticeable if a subset of a stack was picked up and then 'D' used to
drop it again, resulting in two stacks instead of recombining into
the original.

Change the test for mergability to ignore bypass so items will merge
when one has it set and other doesn't.  And when successfully merging
set bypass on the combined stack if either part had that set.
This commit is contained in:
PatR
2022-06-29 11:46:31 -07:00
parent 4fb55653b2
commit 46652d3cef
2 changed files with 25 additions and 3 deletions

View File

@@ -942,6 +942,8 @@ a migrating long worm that couldn't arrive could be placed at <0,0> while
setting up another migration attempt to the level, triggering
impossible "trying to place long worm tail at <0,0> mstate:8 on level"
(message is confused; it should say "long worm" without tail)
dropping things with 'D' wouldn't merge them with compatible items already at
that floor spot because use of obj->bypass made them seem incompatible
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository