diff options
author | Paul Gilbert | 2018-04-29 14:30:08 -0400 |
---|---|---|
committer | Paul Gilbert | 2018-04-29 14:30:08 -0400 |
commit | 432d5fea3010964bc807c56d56f2e30b41c4c327 (patch) | |
tree | bb822cb197f9c17dd0378e4432d44e083538b9bb /engines | |
parent | 7798de5bc60f267d71d8ac85e626326b1bdd157c (diff) | |
download | scummvm-rg350-432d5fea3010964bc807c56d56f2e30b41c4c327.tar.gz scummvm-rg350-432d5fea3010964bc807c56d56f2e30b41c4c327.tar.bz2 scummvm-rg350-432d5fea3010964bc807c56d56f2e30b41c4c327.zip |
XEEN: Fix original bug prematurely resetting WEAK condition
Diffstat (limited to 'engines')
-rw-r--r-- | engines/xeen/interface.cpp | 4 | ||||
-rw-r--r-- | engines/xeen/party.cpp | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp index c00079b73b..fe196bb2e5 100644 --- a/engines/xeen/interface.cpp +++ b/engines/xeen/interface.cpp @@ -1077,6 +1077,10 @@ void Interface::rest() { c._conditions[UNCONSCIOUS] = 0; c._currentHp = c.getMaxHP(); c._currentSp = c.getMaxSP(); + + // WORKAROUND: Resting curing weakness only originally worked due to a bug in changeTime + // resetting WEAK if party wasn't drunk. With that resolved, we have to reset WEAK here + c._conditions[WEAK] = 0; } } } diff --git a/engines/xeen/party.cpp b/engines/xeen/party.cpp index 0d4cd29881..b4b57e75ee 100644 --- a/engines/xeen/party.cpp +++ b/engines/xeen/party.cpp @@ -464,8 +464,12 @@ void Party::changeTime(int numMinutes) { } } - player._conditions[WEAK] = player._conditions[DRUNK]; - player._conditions[DRUNK] = 0; + // WORKAROUND: Original incorrectly reset weakness (due to lack of sleep) even when party + // wasn't drunk. We now have any resetting drunkness add to, rather than replace, weakness + if (player._conditions[WEAK] != -1) { + player._conditions[WEAK] += player._conditions[DRUNK]; + player._conditions[DRUNK] = 0; + } if (player._conditions[DEPRESSED]) { player._conditions[DEPRESSED] = (player._conditions[DEPRESSED] + 1) % 4; |