[Scummvm-git-logs] scummvm master -> e80a33eb74825c5875267a87088cd51f2cfdf748
bluegr
noreply at scummvm.org
Mon Oct 31 22:17:24 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:
e80a33eb74 SCUMM: Prevent Indy from being stuck in Crete (WORKAROUND)
Commit: e80a33eb74825c5875267a87088cd51f2cfdf748
https://github.com/scummvm/scummvm/commit/e80a33eb74825c5875267a87088cd51f2cfdf748
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-11-01T00:17:19+02:00
Commit Message:
SCUMM: Prevent Indy from being stuck in Crete (WORKAROUND)
In the "elevator" room in Crete (where you can pick up the gold box),
one can get stuck in the room, if quickly clicking on the right side of
the room, although that part shouldn't be accessible yet at that point.
This is because the original entry script for this room initializes
the walkbox matrix too late, so it's possible to move to the other side
of the room before the walkbox restrictions kick in. This workaround
just copies the original setBoxFlags() and createBoxMatrix() calls, but
triggers them at an earlier stage.
This enhancement is always enforced, since you can get completely stuck,
and some players can be totally confused by this problem.
Also happens with the original interpreter; I remember hitting this
issue twenty years ago...
Changed paths:
engines/scumm/script_v5.cpp
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 01b8d45e165..6a152798e55 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -3140,6 +3140,27 @@ void ScummEngine_v5::o5_walkActorTo() {
}
}
+ // WORKAROUND: In Indy4, in the Crete room where there's the gold box,
+ // Indy can get stuck if one clicks too quickly on the right and the
+ // "elevator" isn't there yet (also with the original interpreter).
+ // This is because the box matrix is initialized too late in the entry
+ // script for that room, so we have to do it a bit earlier.
+ //
+ // Intentionally not using `_enableEnhancements`, since you can get
+ // completely stuck.
+ if (_game.id == GID_INDY4 && vm.slot[_currentScript].number == 10002 &&
+ _currentRoom == (_game.platform == Common::kPlatformAmiga ? 58 : 60) &&
+ VAR(224) == 140 && a->_number == VAR(VAR_EGO) && x == 45 && y == 137) {
+ // If the elevator isn't on the current floor yet...
+ if (whereIsObject(829) == WIO_ROOM && getState(829) == 0 && getBoxFlags(7) != 128) {
+ // ...immediately set its box flags so that you can't walk on it
+ setBoxFlags(7, 128);
+ for (int i = 12; i <= 15; ++i)
+ setBoxFlags(i, 128);
+ createBoxMatrix();
+ }
+ }
+
a->startWalkActor(x, y, -1);
}
More information about the Scummvm-git-logs
mailing list