Permalink
Browse files

When moving the mouse over a NPC, the cursor would change accordingly…

…, even

... though the NPC was hidden by FoW, so we were leaking their locations

Signed-off-by: Jaka Kranjc <lynxlupodian@users.sourceforge.net>
  • Loading branch information...
1 parent 467962a commit 6c87b34aa6160f89bfe25a22a85a02abb71de30d @traman traman committed with lynxlynxlynx Aug 31, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 gemrb/core/GUI/GameControl.cpp
View
2 gemrb/core/GUI/GameControl.cpp
@@ -1314,7 +1314,7 @@ void GameControl::OnMouseOver(unsigned short x, unsigned short y)
// let us target party members even if they are invisible
lastActor = area->GetActor(p, GA_NO_DEAD|GA_NO_UNSCHEDULED);
if (lastActor && lastActor->Modified[IE_EA]>=EA_CONTROLLED) {
- if (!lastActor->ValidTarget(target_types)) {
+ if (!lastActor->ValidTarget(target_types) || !area->IsVisible(p, false)) {
lastActor = NULL;
}
}

0 comments on commit 6c87b34

Please sign in to comment.