aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2005-04-06 05:04:39 +0000
committerTravis Howell2005-04-06 05:04:39 +0000
commitc66e6bb001f62a9c04951ffd1972dc68de3d44ef (patch)
tree12cb7ecff7ad47b15615feab7e193edde0c46218
parentde94c2411a908d0c216470896e113a96d53a1d1e (diff)
downloadscummvm-rg350-c66e6bb001f62a9c04951ffd1972dc68de3d44ef.tar.gz
scummvm-rg350-c66e6bb001f62a9c04951ffd1972dc68de3d44ef.tar.bz2
scummvm-rg350-c66e6bb001f62a9c04951ffd1972dc68de3d44ef.zip
This section of startScene only exists in scumm5 onwards.
svn-id: r17409
-rw-r--r--scumm/script_v5.cpp2
-rw-r--r--scumm/scumm.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp
index 6430843e18..0e06bf0d0b 100644
--- a/scumm/script_v5.cpp
+++ b/scumm/script_v5.cpp
@@ -1507,6 +1507,8 @@ void ScummEngine_v5::o5_loadRoomWithEgo() {
VAR(VAR_WALKTO_OBJ) = 0;
if (_version <= 4) {
+ if (whereIsObject(obj) != WIO_ROOM)
+ error("startScene: Object %d is not in room %d", obj, _currentRoom);
if (!_egoPositioned) {
getObjectXYPos(obj, x2, y2, dir);
a->putActor(x2, y2, _currentRoom);
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp
index 048d430599..76b02fe6b4 100644
--- a/scumm/scumm.cpp
+++ b/scumm/scumm.cpp
@@ -2245,11 +2245,11 @@ void ScummEngine::startScene(int room, Actor *a, int objectNr) {
memset(gfxUsageBits, 0, sizeof(gfxUsageBits));
- if (a) {
+ if (_version >= 5 && a) {
where = whereIsObject(objectNr);
if (where != WIO_ROOM && where != WIO_FLOBJECT)
error("startScene: Object %d is not in room %d", objectNr,
- _currentRoom);
+ _currentRoom);
int x, y, dir;
getObjectXYPos(objectNr, x, y, dir);
a->putActor(x, y, _currentRoom);