aboutsummaryrefslogtreecommitdiff
path: root/scumm/script_v8.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scumm/script_v8.cpp')
-rw-r--r--scumm/script_v8.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp
index 2d6ffc9ab0..7afb48fa32 100644
--- a/scumm/script_v8.cpp
+++ b/scumm/script_v8.cpp
@@ -1413,12 +1413,9 @@ void ScummEngine_v8::o8_kernelGetFunctions() {
for (int i = _blastObjectQueuePos - 1; i >= 0; i--) {
eo = &_blastObjectQueue[i];
- if (eo->posX <= x && eo->width + eo->posX > x &&
- eo->posY <= y && eo->height + eo->posY > y) {
- if (!getClass(eo->number, kObjectClassUntouchable)) {
- push(eo->number);
- return;
- }
+ if (eo->rect.contains(x, y) && !getClass(eo->number, kObjectClassUntouchable)) {
+ push(eo->number);
+ return;
}
}
push(0);