aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2016-09-03 18:23:02 -0400
committerPaul Gilbert2016-09-03 18:23:02 -0400
commit972e7d65f4cebb07e1724b96543f6b0d25f78360 (patch)
tree8d0c00ca29cd1f98beecaa4639e692345dba7106
parent848c5c3f84ef2526dfc312901b2470a848294f52 (diff)
downloadscummvm-rg350-972e7d65f4cebb07e1724b96543f6b0d25f78360.tar.gz
scummvm-rg350-972e7d65f4cebb07e1724b96543f6b0d25f78360.tar.bz2
scummvm-rg350-972e7d65f4cebb07e1724b96543f6b0d25f78360.zip
TITANIC: Fix message targets when changing views
-rw-r--r--engines/titanic/core/view_item.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/titanic/core/view_item.cpp b/engines/titanic/core/view_item.cpp
index af23fca027..176765b12f 100644
--- a/engines/titanic/core/view_item.cpp
+++ b/engines/titanic/core/view_item.cpp
@@ -115,19 +115,19 @@ void CViewItem::preEnterView(CViewItem *newView) {
// Only do the processing if we've been passed a view, and it's not the same
if (newView && newView != this) {
CPreEnterViewMsg viewMsg(this, newView);
- viewMsg.execute(this, nullptr, MSGFLAG_SCAN);
+ viewMsg.execute(newView, nullptr, MSGFLAG_SCAN);
CNodeItem *oldNode = findNode();
CNodeItem *newNode = newView->findNode();
if (newNode != oldNode) {
CPreEnterNodeMsg nodeMsg(oldNode, newNode);
- nodeMsg.execute(oldNode, nullptr, MSGFLAG_SCAN);
+ nodeMsg.execute(newNode, nullptr, MSGFLAG_SCAN);
CRoomItem *oldRoom = oldNode->findRoom();
CRoomItem *newRoom = newNode->findRoom();
if (newRoom != oldRoom) {
CPreEnterRoomMsg roomMsg(oldRoom, newRoom);
- roomMsg.execute(oldRoom, nullptr, MSGFLAG_SCAN);
+ roomMsg.execute(newRoom, nullptr, MSGFLAG_SCAN);
}
}
}
@@ -137,13 +137,13 @@ void CViewItem::enterView(CViewItem *newView) {
// Only do the processing if we've been passed a view, and it's not the same
if (newView && newView != this) {
CEnterViewMsg viewMsg(this, newView);
- viewMsg.execute(this, nullptr, MSGFLAG_SCAN);
+ viewMsg.execute(newView, nullptr, MSGFLAG_SCAN);
CNodeItem *oldNode = findNode();
CNodeItem *newNode = newView->findNode();
if (newNode != oldNode) {
CEnterNodeMsg nodeMsg(oldNode, newNode);
- nodeMsg.execute(oldNode, nullptr, MSGFLAG_SCAN);
+ nodeMsg.execute(newNode, nullptr, MSGFLAG_SCAN);
CRoomItem *oldRoom = oldNode->findRoom();
CRoomItem *newRoom = newNode->findRoom();
@@ -157,7 +157,7 @@ void CViewItem::enterView(CViewItem *newView) {
if (newRoom != oldRoom) {
CEnterRoomMsg roomMsg(oldRoom, newRoom);
- roomMsg.execute(oldRoom, nullptr, MSGFLAG_SCAN);
+ roomMsg.execute(newRoom, nullptr, MSGFLAG_SCAN);
if (petControl)
petControl->enterRoom(newRoom);