[Scummvm-git-logs] scummvm master -> 432d5fea3010964bc807c56d56f2e30b41c4c327

dreammaster dreammaster at scummvm.org
Sun Apr 29 20:30:17 CEST 2018


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
432d5fea30 XEEN: Fix original bug prematurely resetting WEAK condition


Commit: 432d5fea3010964bc807c56d56f2e30b41c4c327
    https://github.com/scummvm/scummvm/commit/432d5fea3010964bc807c56d56f2e30b41c4c327
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-04-29T14:30:08-04:00

Commit Message:
XEEN: Fix original bug prematurely resetting WEAK condition

Changed paths:
    engines/xeen/interface.cpp
    engines/xeen/party.cpp


diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp
index c00079b..fe196bb 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 0d4cd29..b4b57e7 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;





More information about the Scummvm-git-logs mailing list