diff options
author | Paul Gilbert | 2017-07-05 19:58:11 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-07-05 19:58:11 -0400 |
commit | 6d0207c7d6bbc9c329207cd3ffa120c4b6fc72b0 (patch) | |
tree | 6e56ebb4e9985722de42c7de1b55ec9b3549d317 /engines/titanic/carry | |
parent | 7ed7e022f1ef4cabb35cd38f8c04a1bb9bd6461f (diff) | |
download | scummvm-rg350-6d0207c7d6bbc9c329207cd3ffa120c4b6fc72b0.tar.gz scummvm-rg350-6d0207c7d6bbc9c329207cd3ffa120c4b6fc72b0.tar.bz2 scummvm-rg350-6d0207c7d6bbc9c329207cd3ffa120c4b6fc72b0.zip |
TITANIC: Fix refreshing inventory tooltip when chicken gets cold
Diffstat (limited to 'engines/titanic/carry')
-rw-r--r-- | engines/titanic/carry/chicken.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/engines/titanic/carry/chicken.cpp b/engines/titanic/carry/chicken.cpp index 91d4c95fed..27d09a6189 100644 --- a/engines/titanic/carry/chicken.cpp +++ b/engines/titanic/carry/chicken.cpp @@ -160,19 +160,18 @@ bool CChicken::VisibleMsg(CVisibleMsg *msg) { } bool CChicken::TimerMsg(CTimerMsg *msg) { + // Check whether chicken has been mailed CGameObject *obj = getMailManFirstObject(); while (obj && obj->getName() != "Chicken") obj = getMailManNextObject(obj); - bool flag = false; - if (obj) { - flag = _temperature; - } else if (_temperature > 0) { + // If chicken is not mailed, and still hot, cool it down a bit + if (!obj && _temperature > 0) --_temperature; - flag = _temperature; - } - if (flag) { + // If chicken is cooled, refresh the inventory, just in case + // the user had the hot chicken selected + if (!_temperature) { petInvChange(); stopTimer(_timerId); } |