Fix typo in previous clean up.

This commit is contained in:
Joris 2010-11-11 16:57:23 +01:00
parent 1577067261
commit 7f6489e942

View file

@ -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!