Permalink
Browse files

be smarter about hiding undiscovered secret doors via cursors

iwd ar6010 table/door/puzzle is walkable, secret and undetectable;
until now it was impossible to solve properly, without springing the
last trap
  • Loading branch information...
1 parent fd0bcf5 commit 89af392ccbc20dba9bcb348bbeb8dc360fb18c30 @lynxlynxlynx lynxlynxlynx committed May 2, 2014
Showing with 7 additions and 1 deletion.
  1. +7 −1 gemrb/core/GUI/GameControl.cpp
@@ -1186,7 +1186,13 @@ int GameControl::GetCursorOverDoor(Door *overDoor) const
{
if (!overDoor->Visible()) {
if (target_mode == TARGET_MODE_NONE) {
- return IE_CURSOR_BLOCKED;
+ // most secret doors are in walls, so default to the blocked cursor to not give them away
+ // iwd ar6010 table/door/puzzle is walkable, secret and undetectable
+ Game *game = core->GetGame();
+ if (!game) return IE_CURSOR_BLOCKED;
+ Map *area = game->GetCurrentArea();
+ if (!area) return IE_CURSOR_BLOCKED;
+ return area->GetCursor(overDoor->Pos);
} else {
return lastCursor|IE_CURSOR_GRAY;
}

0 comments on commit 89af392

Please sign in to comment.