fix #1466 fix - stacking in inventory

The earlier fix from a couple of days ago was mislabeled as #1455
but was actually #1466.  It fixed picking up a thrown stack into
hero's empty quiver but broke keeping thrown items, dropped items,
and stolen items separate on the floor.  This repairs that.
This commit is contained in:
PatR
2025-12-26 14:53:59 -08:00
parent 4d33d00ad2
commit 5030de7343

View File

@@ -1150,7 +1150,6 @@ addinv_core0(
setuqwep(obj);
added:
obj->pickup_prev = 1;
obj->how_lost = 0;
addinv_core2(obj); /* handle extrinsics conferred by carrying obj */
carry_obj_effects(obj); /* carrying affects the obj */
if (update_perm_invent)
@@ -5104,8 +5103,7 @@ mergable(
if (obj->how_lost == LOST_EXPLODING
|| otmp->how_lost == LOST_EXPLODING)
return FALSE;
if ((obj->how_lost & ~LOSTOVERRIDEMASK)
!= (otmp->how_lost & ~LOSTOVERRIDEMASK))
if (otmp->how_lost != LOST_NONE && (obj->how_lost != otmp->how_lost))
return FALSE;
#if 0 /* don't require 'bypass' to match; that results in items dropped
* via 'D' not stacking with compatible items already on the floor;