Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDB: Fix not being able to pick up Red Unimail Envelope with keyboard #4726

Merged
merged 1 commit into from Feb 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions engines/hdb/ai-funcs.cpp
Expand Up @@ -2384,6 +2384,12 @@ void AI::movePlayer(uint16 buttons) {
int ny = _player->tileY + yva[_player->dir];
AIEntity *hit = findEntity(nx, ny);

if (hit && hit->type == AI_NONE) {
AIEntity *temp = g_hdb->_ai->findEntityIgnore(nx, ny, hit);
if (temp)
hit = temp;
}

// the reason to check for no entity or an AI_NONE is because
// there's a possibility that an actual entity and a LUA entity
// can share the same spot, so we need to be able to deal with
Expand Down