aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/titanic/game_manager.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/titanic/game_manager.cpp b/engines/titanic/game_manager.cpp
index ed6f56decb..d6cc7d14fc 100644
--- a/engines/titanic/game_manager.cpp
+++ b/engines/titanic/game_manager.cpp
@@ -130,8 +130,14 @@ void CGameManager::roomTransition(CRoomItem *oldRoom, CRoomItem *newRoom) {
delete _movie;
_movie = nullptr;
- CResourceKey movieKey = (oldRoom == newRoom) ? oldRoom->getTransitionMovieKey() :
- oldRoom->getExitMovieKey();
+ CResourceKey movieKey;
+ if (newRoom == oldRoom) {
+ movieKey = oldRoom->getTransitionMovieKey();
+ _movieRoom = oldRoom;
+ } else {
+ movieKey = oldRoom->getExitMovieKey();
+ }
+
CString filename = movieKey.getFilename();
if (g_vm->_filesManager->fileExists(filename)) {
_movieSurface->freeSurface();