summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/gameMainWindow.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/gameMainWindow.cpp b/ui/gameMainWindow.cpp
index b559341..f895a20 100644
--- a/ui/gameMainWindow.cpp
+++ b/ui/gameMainWindow.cpp
@@ -60,11 +60,11 @@ public:
const auto mouse = glm::vec2 {e.button.x, e.button.y} / position.size;
glm::vec2 baryPos {};
- float eh;
+ float distance;
const auto ray = camera->unProject(mouse);
- if (const auto selected
- = gameState->world.applyOne<Selectable>(&Selectable::intersectRay, ray, &baryPos, &eh);
+ if (const auto selected = gameState->world.applyOne<Selectable>(
+ &Selectable::intersectRay, ray, &baryPos, &distance);
selected != gameState->world.end()) {
const auto & ref = *selected.base()->get();
clicked = typeid(ref).name();