address #K4246 - pushing shop boulder out of shop
The report is for 3.6.7: pushing a boulder into a general store adds it to shop's inventory, but pushing it back out lets player remove it for free. 3.7 has already fixed this; update its comments though.
This commit is contained in:
+6
-3
@@ -482,13 +482,16 @@ moverock(void)
|
|||||||
} else {
|
} else {
|
||||||
newsym(sx, sy);
|
newsym(sx, sy);
|
||||||
}
|
}
|
||||||
/* maybe adjust bill if boulder was pushed across shop boundary */
|
/* maybe adjust bill if boulder was pushed across shop boundary;
|
||||||
|
normally otmp->unpaid would not apply because otmp isn't in hero's
|
||||||
|
inventory, but addtobill() sets it and subfrombill() clears it */
|
||||||
if (costly && !costly_spot(rx, ry)) {
|
if (costly && !costly_spot(rx, ry)) {
|
||||||
|
/* pushing from inside the shop to its boundary (or free spot) */
|
||||||
addtobill(otmp, FALSE, FALSE, FALSE);
|
addtobill(otmp, FALSE, FALSE, FALSE);
|
||||||
} else if (!costly && costly_spot(rx, ry) && otmp->unpaid
|
} else if (!costly && costly_spot(rx, ry) && otmp->unpaid
|
||||||
&& ((shkp = shop_keeper(*in_rooms(rx, ry, SHOPBASE)))
|
&& ((shkp = shop_keeper(*in_rooms(rx, ry, SHOPBASE))) != 0)
|
||||||
!= 0)
|
|
||||||
&& onshopbill(otmp, shkp, TRUE)) {
|
&& onshopbill(otmp, shkp, TRUE)) {
|
||||||
|
/* [can this case actually happen?] */
|
||||||
subfrombill(otmp, shkp);
|
subfrombill(otmp, shkp);
|
||||||
} else if (otmp->unpaid
|
} else if (otmp->unpaid
|
||||||
&& (shkp = find_objowner(otmp, sx, sy)) != 0
|
&& (shkp = find_objowner(otmp, sx, sy)) != 0
|
||||||
|
|||||||
Reference in New Issue
Block a user