[Scummvm-git-logs] scummvm master -> 8cb9d8d52af3f9643e509cbf1345906588622a91
elasota
noreply at scummvm.org
Fri Jun 17 02:17:49 UTC 2022
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:
8cb9d8d52a MTROPOLIS: Permit transitions to the same scene
Commit: 8cb9d8d52af3f9643e509cbf1345906588622a91
https://github.com/scummvm/scummvm/commit/8cb9d8d52af3f9643e509cbf1345906588622a91
Author: elasota (ejlasota at gmail.com)
Date: 2022-06-16T22:16:45-04:00
Commit Message:
MTROPOLIS: Permit transitions to the same scene
Changed paths:
engines/mtropolis/runtime.cpp
diff --git a/engines/mtropolis/runtime.cpp b/engines/mtropolis/runtime.cpp
index ba52efa9771..34b89e7b857 100644
--- a/engines/mtropolis/runtime.cpp
+++ b/engines/mtropolis/runtime.cpp
@@ -3937,8 +3937,8 @@ void Runtime::executeLowLevelSceneStateTransition(const LowLevelSceneStateTransi
}
void Runtime::executeCompleteTransitionToScene(const Common::SharedPtr<Structural> &targetScene) {
- if (targetScene == _activeMainScene)
- return;
+ // NOTE: Transitioning to the same scene is allowed, Obsidian relies on this to avoid getting stuck
+ // after going up the wrong side in the Bureau chapter final area (i.e. after reaching the sky face).
if (_sceneStack.size() == 0)
_sceneStack.resize(1); // Reserve shared scene slot
@@ -3954,18 +3954,15 @@ void Runtime::executeCompleteTransitionToScene(const Common::SharedPtr<Structura
bool sceneAlreadyInStack = false;
for (size_t i = _sceneStack.size() - 1; i > 0; i--) {
Common::SharedPtr<Structural> stackedScene = _sceneStack[i].scene;
- if (stackedScene == targetScene) {
- sceneAlreadyInStack = true;
- } else {
- queueEventAsLowLevelSceneStateTransitionAction(Event::create(EventIDs::kSceneEnded, 0), _activeMainScene.get(), true, true);
- queueEventAsLowLevelSceneStateTransitionAction(Event::create(EventIDs::kParentDisabled, 0), _activeMainScene.get(), true, true);
- _pendingLowLevelTransitions.push_back(LowLevelSceneStateTransitionAction(_activeMainScene, LowLevelSceneStateTransitionAction::kUnload));
- if (stackedScene == targetSharedScene)
- error("Transitioned to a shared scene which was already on the stack as a normal scene. This is not supported.");
+ queueEventAsLowLevelSceneStateTransitionAction(Event::create(EventIDs::kSceneEnded, 0), _activeMainScene.get(), true, true);
+ queueEventAsLowLevelSceneStateTransitionAction(Event::create(EventIDs::kParentDisabled, 0), _activeMainScene.get(), true, true);
+ _pendingLowLevelTransitions.push_back(LowLevelSceneStateTransitionAction(_activeMainScene, LowLevelSceneStateTransitionAction::kUnload));
- _sceneStack.remove_at(i);
- }
+ if (stackedScene == targetSharedScene)
+ error("Transitioned to a shared scene which was already on the stack as a normal scene. This is not supported.");
+
+ _sceneStack.remove_at(i);
}
if (targetSharedScene != _activeSharedScene) {
@@ -3985,7 +3982,7 @@ void Runtime::executeCompleteTransitionToScene(const Common::SharedPtr<Structura
_sceneStack[0] = sharedSceneEntry;
}
- if (!sceneAlreadyInStack) {
+ {
_pendingLowLevelTransitions.push_back(LowLevelSceneStateTransitionAction(targetScene, LowLevelSceneStateTransitionAction::kLoad));
queueEventAsLowLevelSceneStateTransitionAction(Event::create(EventIDs::kParentEnabled, 0), targetScene.get(), true, true);
queueEventAsLowLevelSceneStateTransitionAction(Event::create(EventIDs::kSceneStarted, 0), targetScene.get(), true, true);
@@ -4049,7 +4046,7 @@ void Runtime::executeHighLevelSceneTransition(const HighLevelSceneTransition &tr
case HighLevelSceneTransition::kTypeChangeToScene: {
const Common::SharedPtr<Structural> targetScene = transition.scene;
- if (transition.addToDestinationScene || !transition.addToReturnList) {
+ if (transition.addToDestinationScene || transition.addToReturnList) {
SceneReturnListEntry returnListEntry;
returnListEntry.isAddToDestinationSceneTransition = transition.addToDestinationScene;
returnListEntry.scene = _activeMainScene;
More information about the Scummvm-git-logs
mailing list