B05001 - eating a tin in a stack on the floor

Make sure to splitobj tin.tin before calling bill_dummy_object.
Avoids charging to all the stacked tins when you eat the 1st one.
This commit is contained in:
cohrs
2003-07-19 03:29:21 +00:00
parent 11ecff5540
commit 39a0544360
2 changed files with 5 additions and 0 deletions

View File

@@ -105,6 +105,7 @@ try to keep saddle at the same location as the steed corpse
never display I symbol on the mounted hero/steed location
pit digging is no longer stopped by a sleeping monster next to you
ensure mksobj() always attaches timer to corpse, even if called with init FALSE
only charge for eating one stacked tin, not all at once
Platform- and/or Interface-Specific Fixes

View File

@@ -1057,6 +1057,8 @@ opentin() /* called during each move whilst opening a tin */
!tin.tin->no_charge)
|| tin.tin->unpaid)) {
verbalize("You open it, you bought it!");
/* charge for one at pre-eating cost */
if(tin.tin->quan > 1L) tin.tin = splitobj(tin.tin, 1L);
bill_dummy_object(tin.tin);
}
@@ -1090,6 +1092,8 @@ opentin() /* called during each move whilst opening a tin */
!tin.tin->no_charge)
|| tin.tin->unpaid)) {
verbalize("You open it, you bought it!");
/* charge for one at pre-eating cost */
if(tin.tin->quan > 1L) tin.tin = splitobj(tin.tin, 1L);
bill_dummy_object(tin.tin);
}