Fix UnitUnderCursor for unit visible under fog : Right-click on (under fog) gold-mine work as expected (harvesting).
This commit is contained in:
parent
4a5bffd839
commit
74e33dda51
1 changed files with 2 additions and 2 deletions
|
@ -879,14 +879,14 @@ void UIHandleMouseMove(int x, int y)
|
|||
ShowNameTime = GameCycle + Preference.ShowNameDelay + Preference.ShowNameTime;
|
||||
}
|
||||
|
||||
if (Map.IsFieldVisible(*ThisPlayer, tilePos) || ReplayRevealMap) {
|
||||
if (Map.IsFieldExplored(*ThisPlayer, tilePos) || ReplayRevealMap) {
|
||||
const PixelPos mapPixelPos = vp.ScreenToMapPixelPos(screenPos);
|
||||
UnitUnderCursor = UnitOnScreen(NULL, mapPixelPos.x, mapPixelPos.y);
|
||||
}
|
||||
} else if (CursorOn == CursorOnMinimap) {
|
||||
const Vec2i tilePos = {UI.Minimap.Screen2MapX(x), UI.Minimap.Screen2MapY(y)};
|
||||
|
||||
if (Map.IsFieldVisible(*ThisPlayer, tilePos) || ReplayRevealMap) {
|
||||
if (Map.IsFieldExplored(*ThisPlayer, tilePos) || ReplayRevealMap) {
|
||||
UnitUnderCursor = UnitOnMapTile(tilePos, -1);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue