diff options
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/object.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp index cbc24a8b7e..f4aea93b8b 100644 --- a/engines/scumm/object.cpp +++ b/engines/scumm/object.cpp @@ -1538,7 +1538,8 @@ int ScummEngine::getObjX(int obj) { if (whereIsObject(obj) == WIO_NOT_FOUND) return -1; int x, y; - getObjectOrActorXY(obj, x, y); + if (getObjectOrActorXY(obj, x, y) == -1) + return -1; return x; } } @@ -1553,7 +1554,8 @@ int ScummEngine::getObjY(int obj) { if (whereIsObject(obj) == WIO_NOT_FOUND) return -1; int x, y; - getObjectOrActorXY(obj, x, y); + if (getObjectOrActorXY(obj, x, y) == -1) + return -1; return y; } } |