aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen/party.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2018-04-29 14:30:08 -0400
committerPaul Gilbert2018-04-29 14:30:08 -0400
commit432d5fea3010964bc807c56d56f2e30b41c4c327 (patch)
treebb822cb197f9c17dd0378e4432d44e083538b9bb /engines/xeen/party.cpp
parent7798de5bc60f267d71d8ac85e626326b1bdd157c (diff)
downloadscummvm-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/xeen/party.cpp')
-rw-r--r--engines/xeen/party.cpp8
1 files changed, 6 insertions, 2 deletions
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;