aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2019-07-20 13:32:38 +0200
committerEugene Sandulenko2019-09-03 17:17:25 +0200
commit252c6e61c9bddd9db1b9325d9c622b13736a92d7 (patch)
tree0c26bef4008fd12b89c2653579baae44f42273f7
parent4c0181ac310d79343a4874aa33052de8485d8c7e (diff)
downloadscummvm-rg350-252c6e61c9bddd9db1b9325d9c622b13736a92d7.tar.gz
scummvm-rg350-252c6e61c9bddd9db1b9325d9c622b13736a92d7.tar.bz2
scummvm-rg350-252c6e61c9bddd9db1b9325d9c622b13736a92d7.zip
HDB: Fix player collision detection code
-rw-r--r--engines/hdb/ai-funcs.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp
index 02c694120b..7b72c97821 100644
--- a/engines/hdb/ai-funcs.cpp
+++ b/engines/hdb/ai-funcs.cpp
@@ -2064,7 +2064,8 @@ bool AI::checkPlayerCollision(int x, int y, int border) {
if (g_hdb->getDebug() == 2 || !_player)
return false;
- return (x > (_player->x - 32 + border) && x < (_player->x - 32 - border) && y >(_player->y - 32 + border) && y < (_player->y - 32 - border));
+ return (x > (_player->x - 32 + border) && x < (_player->x + 32 - border) &&
+ y > (_player->y - 32 + border) && y < (_player->y + 32 - border));
}
void AI::clearDiverters() {