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.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/scumm/script_v0.cpp b/engines/scumm/script_v0.cpp
index 42843fe947..78853ecbae 100644
--- a/engines/scumm/script_v0.cpp
+++ b/engines/scumm/script_v0.cpp
@@ -647,6 +647,9 @@ void ScummEngine_v0::o_loadRoomWithEgo() {
startScene(a->_room, a, obj);
getObjectXYPos(obj, x, y, dir);
+ AdjustBoxResult r = a->adjustXYToBeInBox(x, y);
+ x = r.x;
+ y = r.y;
a->putActor(x, y, _currentRoom);
a->setDirection(dir + 180);
@@ -742,9 +745,12 @@ void ScummEngine_v0::o_putActorAtObject() {
a = derefActor(getVarOrDirectByte(PARAM_1), "o_putActorAtObject");
obj = fetchScriptByte();
- if (whereIsObject(obj) != WIO_NOT_FOUND)
+ if (whereIsObject(obj) != WIO_NOT_FOUND) {
getObjectXYPos(obj, x, y);
- else {
+ AdjustBoxResult r = a->adjustXYToBeInBox(x, y);
+ x = r.x;
+ y = r.y;
+ } else {
x = 30;
y = 60;
}