aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/script_v2.cpp
diff options
context:
space:
mode:
authorMax Horn2007-03-11 15:23:50 +0000
committerMax Horn2007-03-11 15:23:50 +0000
commitb07482b0b2b7de21c1759aeefb5c489f72be123c (patch)
treefd5e5476667179b12fc63a031faed04d0369ae0b /engines/scumm/script_v2.cpp
parenta1b5d998351b97f3c2a5089c043edb5236140a94 (diff)
downloadscummvm-rg350-b07482b0b2b7de21c1759aeefb5c489f72be123c.tar.gz
scummvm-rg350-b07482b0b2b7de21c1759aeefb5c489f72be123c.tar.bz2
scummvm-rg350-b07482b0b2b7de21c1759aeefb5c489f72be123c.zip
A long time ago, in a virtual machine far, far away...
It is a period of bug fixing. Rebel developers, coding from a public project, have won their umpteenth victory against the evil Actor Walk Bugs. During the debugging, programmers used secret plans to the LucasArts' ultimate tool, the SCUMM engine, an extensible scripting system with enough power to create an entire adventure. Pursued by ensuing sinister regressions, High King Fingolfin gleefully jumps up and down, making use of the hotkey that can save his games and restore them back again later.... [With apologies to George Lucas. Good riddance to bugs #751662, #771483, #959001, #1329457, #1329498, #1329529, #1527672, #1538260, #1571701, #1571705, #1571740, and a warm welcome to the regressions this change will cause. :-) ] svn-id: r26090
Diffstat (limited to 'engines/scumm/script_v2.cpp')
-rw-r--r--engines/scumm/script_v2.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp
index a71e2596b4..9fc0f0659f 100644
--- a/engines/scumm/script_v2.cpp
+++ b/engines/scumm/script_v2.cpp
@@ -1202,6 +1202,9 @@ void ScummEngine_v2::o2_walkActorToObject() {
if (whereIsObject(obj) != WIO_NOT_FOUND) {
int x, y, dir;
getObjectXYPos(obj, x, y, dir);
+ AdjustBoxResult r = a->adjustXYToBeInBox(x, y);
+ x = r.x;
+ y = r.y;
a->startWalkActor(x, y, dir);
}
}
@@ -1212,9 +1215,12 @@ void ScummEngine_v2::o2_putActorAtObject() {
a = derefActor(getVarOrDirectByte(PARAM_1), "o2_putActorAtObject");
obj = getVarOrDirectWord(PARAM_2);
- 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;
}
@@ -1374,6 +1380,9 @@ void ScummEngine_v2::o2_loadRoomWithEgo() {
startScene(a->_room, a, obj);
getObjectXYPos(obj, x2, y2, dir);
+ AdjustBoxResult r = a->adjustXYToBeInBox(x2, y2);
+ x2 = r.x;
+ y2 = r.y;
a->putActor(x2, y2, _currentRoom);
a->setDirection(dir + 180);