From 9f7db50de0537ae9e918ab3a9cf49e01eda93cf1 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Thu, 8 Aug 2013 16:32:14 +0100 Subject: Fixed food handler for mushroom soup - proper food level and saturation are applied and the player receives a wooden bowl back after nomming --- source/Player.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/Player.cpp') diff --git a/source/Player.cpp b/source/Player.cpp index fb752ed87..6219523cf 100644 --- a/source/Player.cpp +++ b/source/Player.cpp @@ -400,7 +400,14 @@ void cPlayer::FinishEating(void) return; } ItemHandler->OnFoodEaten(m_World, this, &Item); + GetInventory().RemoveOneEquippedItem(); + + //if the food is mushroom soup, return a bowl to the inventory + if( Item.m_ItemType == E_ITEM_MUSHROOM_SOUP ) { + cItem emptyBowl(E_ITEM_BOWL, 1, 0, ""); + GetInventory().AddItem(emptyBowl, true, true); + } } -- cgit v1.2.3