summaryrefslogtreecommitdiff
path: root/src/gui/viewport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r--src/gui/viewport.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index f2e32973..01324a47 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -399,8 +399,8 @@ Viewport::mousePressed(gcn::MouseEvent &event)
// Interact with some being
// if ((being = beingManager->findBeing(tilex, tiley))
- int x = event.getX() + mPixelViewX;
- int y = event.getY() + mPixelViewY;
+ int x = (int)((float) event.getX() + mPixelViewX);
+ int y = (int)((float) event.getY() + mPixelViewY);
if ((being = beingManager->findBeingByPixel(x, y)))
{
switch (being->getType())