[Scummvm-git-logs] scummvm master -> ad43619b7edc14e407c2eb0cc2df6201edf1ab86

dreammaster dreammaster at scummvm.org
Mon Aug 14 01:03:59 CEST 2017


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:
ad43619b7e TITANIC: Stop SuccUBus turning on when dragging mail


Commit: ad43619b7edc14e407c2eb0cc2df6201edf1ab86
    https://github.com/scummvm/scummvm/commit/ad43619b7edc14e407c2eb0cc2df6201edf1ab86
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-08-13T19:03:54-04:00

Commit Message:
TITANIC: Stop SuccUBus turning on when dragging mail

Changed paths:
    engines/titanic/npcs/succubus.cpp


diff --git a/engines/titanic/npcs/succubus.cpp b/engines/titanic/npcs/succubus.cpp
index 1fe0242..6eeccd3 100644
--- a/engines/titanic/npcs/succubus.cpp
+++ b/engines/titanic/npcs/succubus.cpp
@@ -226,32 +226,39 @@ void CSuccUBus::load(SimpleFile *file) {
 }
 
 bool CSuccUBus::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
-	if (!_inProgress) {
-		Rect tempRect = _rect1;
-		tempRect.translate(_bounds.left, _bounds.top);
-
-		if (!_isOn || (_mailPresent && tempRect.contains(msg->_mousePos))) {
-			CTurnOn onMsg;
-			onMsg.execute(this);
-			_isOn = true;
-		} else if (getRandomNumber(256) < 130) {
-			_isOn = false;
-			CTurnOff offMsg;
-			offMsg.execute(this);
-		} else {
-			switch (getRandomNumber(2, &_priorRandomVal1)) {
-			case 0:
-				startTalking(this, 230055, findView());
-				break;
-			case 1:
-				startTalking(this, 230067, findView());
-				break;
-			case 2:
-				startTalking(this, 230045, findView());
-				break;
-			default:
-				break;
-			}
+	if (_inProgress)
+		return true;
+
+	Rect tempRect = _rect1;
+	tempRect.translate(_bounds.left, _bounds.top);
+
+	if (!_isOn) {
+		CTurnOn onMsg;
+		onMsg.execute(this);
+		_isOn = true;
+		return true;
+	}
+
+	if (_mailPresent && tempRect.contains(msg->_mousePos))
+		return true;
+
+	if (getRandomNumber(256) < 130) {
+		_isOn = false;
+		CTurnOff offMsg;
+		offMsg.execute(this);
+	} else {
+		switch (getRandomNumber(2, &_priorRandomVal1)) {
+		case 0:
+			startTalking(this, 230055, findView());
+			break;
+		case 1:
+			startTalking(this, 230067, findView());
+			break;
+		case 2:
+			startTalking(this, 230045, findView());
+			break;
+		default:
+			break;
 		}
 	}
 





More information about the Scummvm-git-logs mailing list