From 980c5c41dc8e88ab3e7a5751348a92a0662a2ea4 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 21 Jul 2008 22:03:26 +0000 Subject: prepare keybinds for modifier keys, fix for the camera clipping issue --- src/client/input.cc | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'src/client/input.cc') diff --git a/src/client/input.cc b/src/client/input.cc index 8075058..5e75f0a 100644 --- a/src/client/input.cc +++ b/src/client/input.cc @@ -418,7 +418,7 @@ void frame(float seconds) // FIXME console key is always captured // FIXME ESC should escape to gui - if ((key->sym() == SDLK_ESCAPE) || (key->bind().compare("ui_console") == 0)) { + if ((key->sym() == SDLK_ESCAPE) || (key->bind(Key::None).compare("ui_console") == 0)) { console()->toggle(); local_direction = 0.0f; local_pitch = 0.0f; @@ -444,34 +444,36 @@ void frame(float seconds) targets::select_target(targets::hover()); } else { - char c = key->bind().c_str()[0]; + // FIXME modifier + char c = key->bind(Key::None).c_str()[0]; if (c == '+' || c == '-') { // action bind - action_press(key->bind()); + action_press(key->bind(Key::None)); } else if (c) { // normal bind - core::cmd() << key->bind() << "\n"; + core::cmd() << key->bind(Key::None) << "\n"; } } } else if (core::application()->connected()) { - - char c = key->bind().c_str()[0]; + // FIXME modifier + + char c = key->bind(Key::None).c_str()[0]; if (c && c != '+' && c != '-') { // normal bind - core::cmd() << key->bind() << "\n"; + core::cmd() << key->bind(Key::None) << "\n"; } } } else { if (core::application()->connected() && core::localcontrol() && !console()->visible() && !chat::visible()) { - - char c = key->bind().c_str()[0]; + // FIXME modifier (note: mmmmm, modifier could be released by now) + char c = key->bind(Key::None).c_str()[0]; if (c == '+' || c == '-') { // action bind - action_release(key->bind()); + action_release(key->bind(Key::None)); } } } -- cgit v1.2.3