From 39a054436010072da4399b548837334317583846 Mon Sep 17 00:00:00 2001 From: cohrs Date: Sat, 19 Jul 2003 03:29:21 +0000 Subject: [PATCH] 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. --- doc/fixes34.2 | 1 + src/eat.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/doc/fixes34.2 b/doc/fixes34.2 index 6945d9ca0..9bdee7ca3 100644 --- a/doc/fixes34.2 +++ b/doc/fixes34.2 @@ -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 diff --git a/src/eat.c b/src/eat.c index 8783871ea..79e235a88 100644 --- a/src/eat.c +++ b/src/eat.c @@ -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); }