Fix typo in previous clean up.
This commit is contained in:
parent
1577067261
commit
7f6489e942
1 changed files with 4 additions and 1 deletions
|
@ -1923,7 +1923,10 @@ void UIHandleButtonUp(unsigned button)
|
|||
const Vec2i cursorTilePos = {UI.MouseViewport->Viewport2MapX(CursorX),
|
||||
UI.MouseViewport->Viewport2MapY(CursorY)};
|
||||
if (Map.IsFieldVisible(ThisPlayer, cursorTilePos) || ReplayRevealMap) {
|
||||
unit = UnitOnScreen(unit, cursorTilePos.x, cursorTilePos.y);
|
||||
int pixelposx = CursorX - UI.MouseViewport->X + UI.MouseViewport->MapX * TileSizeX + UI.MouseViewport->OffsetX;
|
||||
int pixelposy = CursorY - UI.MouseViewport->Y + UI.MouseViewport->MapY * TileSizeY + UI.MouseViewport->OffsetY;
|
||||
|
||||
unit = UnitOnScreen(unit, pixelposx, pixelposy);
|
||||
}
|
||||
if (unit) {
|
||||
// FIXME: Not nice coded, button number hardcoded!
|
||||
|
|
Loading…
Add table
Reference in a new issue