HDB: Fix player collision detection code

This commit is contained in:
Eugene Sandulenko 2019-07-20 13:32:38 +02:00
parent 4c0181ac31
commit 252c6e61c9

View File

@ -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() {