diff options
-rw-r--r-- | scumm/script_v5.cpp | 2 | ||||
-rw-r--r-- | scumm/scumm.cpp | 4 |
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); |