aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game/sgt
diff options
context:
space:
mode:
authorPaul Gilbert2017-10-10 19:19:46 -0400
committerPaul Gilbert2017-10-10 19:19:46 -0400
commit3fd2cf29b14f92015052fc85aee9299de57360e7 (patch)
treebba29105b1e1b4ff82c447c282b30a8c57608c8d /engines/titanic/game/sgt
parent1f5908c9bd7f4d19ed71fae1ed31fb2b294bf8ed (diff)
downloadscummvm-rg350-3fd2cf29b14f92015052fc85aee9299de57360e7.tar.gz
scummvm-rg350-3fd2cf29b14f92015052fc85aee9299de57360e7.tar.bz2
scummvm-rg350-3fd2cf29b14f92015052fc85aee9299de57360e7.zip
TITANIC: Only allow moving to SGT TV in assigned room
Diffstat (limited to 'engines/titanic/game/sgt')
-rw-r--r--engines/titanic/game/sgt/sgt_nav.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/engines/titanic/game/sgt/sgt_nav.cpp b/engines/titanic/game/sgt/sgt_nav.cpp
index 3be92b4828..904ce64217 100644
--- a/engines/titanic/game/sgt/sgt_nav.cpp
+++ b/engines/titanic/game/sgt/sgt_nav.cpp
@@ -21,6 +21,7 @@
*/
#include "titanic/game/sgt/sgt_nav.h"
+#include "titanic/pet_control/pet_control.h"
namespace Titanic {
@@ -43,7 +44,9 @@ bool SGTNav::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
CTurnOn onMsg;
CTurnOff offMsg;
- if (_statics->_chestOfDrawers == "Open" && _statics->_bedhead == "Open") {
+ CPetControl *pet = getPetControl();
+ if (_statics->_chestOfDrawers == "Open" && _statics->_bedhead == "Open"
+ && pet->isInAssignedRoom()) {
if (_statics->_vase == "Open")
offMsg.execute("Vase");
if (_statics->_tv == "Closed")
@@ -68,10 +71,14 @@ bool SGTNav::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
}
bool SGTNav::MouseMoveMsg(CMouseMoveMsg *msg) {
- if (_statics->_chestOfDrawers == "Open" && _statics->_bedhead == "Open")
- _cursorId = CURSOR_MOVE_FORWARD;
- else
- _cursorId = CURSOR_ARROW;
+ _cursorId = CURSOR_ARROW;
+
+ if (_statics->_chestOfDrawers == "Open" && _statics->_bedhead == "Open") {
+ CPetControl *pet = getPetControl();
+ if (pet->isInAssignedRoom()) {
+ _cursorId = CURSOR_MOVE_FORWARD;
+ }
+ }
return true;
}