Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/input.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/client/input.cc b/src/client/input.cc
index 751b3ca..052ffb2 100644
--- a/src/client/input.cc
+++ b/src/client/input.cc
@@ -464,6 +464,11 @@ void key_pressed(Key *key)
} else if (core::application()->connected() && core::localcontrol()) {
+ if ((render::Camera::mode() == render::Camera::Free) && (key->sym() == 512 + SDL_BUTTON_LEFT) && targets::hover()) {
+ // hovering target selected
+ targets::select_target(targets::hover());
+
+ } else {
char c = key->bind(convert_SDL_modifier(keyboard_modifiers)).c_str()[0];
if (c == '+') {
// action bind
@@ -473,6 +478,7 @@ void key_pressed(Key *key)
// normal bind
core::cmd() << key->bind(convert_SDL_modifier(keyboard_modifiers)) << "\n";
}
+ }
} else if (core::application()->connected()) {
@@ -488,8 +494,8 @@ void key_pressed(Key *key)
void key_released(Key *key)
{
if (core::application()->connected() && core::localcontrol() && !console()->visible() && !chat::visible()) {
- if ((key->sym() == 512 + SDL_BUTTON_LEFT) && targets::hover()) {
+ if ((render::Camera::mode() != render::Camera::Free) && (key->sym() == 512 + SDL_BUTTON_LEFT) && targets::hover()) {
// hovering target selected
targets::select_target(targets::hover());
}