aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/script_v0.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/scumm/script_v0.cpp')
-rw-r--r--engines/scumm/script_v0.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/engines/scumm/script_v0.cpp b/engines/scumm/script_v0.cpp
index d21b26beb3..828691f05c 100644
--- a/engines/scumm/script_v0.cpp
+++ b/engines/scumm/script_v0.cpp
@@ -635,7 +635,19 @@ void ScummEngine_v0::o_loadRoomWithEgo() {
a = derefActor(VAR(VAR_EGO), "o_loadRoomWithEgo");
- a->putActor(0, 0, room);
+ //0x634F
+ if ((((ActorC64*) a)->_miscflags & 0x40)) {
+
+ // TODO: Check if this is the correct function
+ // to be calling here
+ stopObjectCode();
+ return;
+ }
+
+ // The original interpreter seems to set the actors new room X/Y to the last rooms X/Y
+ // This fixes a problem with MM: script 158 in room 12, the 'Oompf!' script
+ // This scripts runs before the actor position is set to the correct location
+ a->putActor(a->getPos().x, a->getPos().y, room);
_egoPositioned = false;
startScene(a->_room, a, obj);
@@ -815,6 +827,10 @@ void ScummEngine_v0::o_setActorBitVar() {
else
a->_miscflags &= ~mask;
+ // This flag causes the actor to stop moving (used by script #158, Green Tentacle 'Oomph!')
+ if (a->_miscflags & 0x40)
+ a->stopActorMoving();
+
debug(0, "o_setActorBitVar(%d, %d, %d)", act, mask, mod);
}