diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-10-04 22:37:35 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-10-04 22:37:35 +0000 |
| commit | b73dcec3975877fd374b55b425c99bb1d6921b53 (patch) | |
| tree | 4463603511162ff4986bccfa37ee8768848a20eb /src/game/client/game_client.cpp | |
| parent | 10812e621a4cf485a62d76444a6af5dec6cc92f1 (diff) | |
| download | zcatch-b73dcec3975877fd374b55b425c99bb1d6921b53.tar.gz zcatch-b73dcec3975877fd374b55b425c99bb1d6921b53.zip | |
added mousewheel support. added next/prev weapon support
Diffstat (limited to 'src/game/client/game_client.cpp')
| -rw-r--r-- | src/game/client/game_client.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/game/client/game_client.cpp b/src/game/client/game_client.cpp index dfb8e698..80a71114 100644 --- a/src/game/client/game_client.cpp +++ b/src/game/client/game_client.cpp @@ -1780,7 +1780,7 @@ void render_game() input.target_x = (int)mouse_pos.x; input.target_y = (int)mouse_pos.y; - input.activeweapon = -1; + input.activeweapon = 0; if(chat_mode != CHATMODE_NONE) input.state = STATE_CHATTING; @@ -1795,13 +1795,14 @@ void render_game() // TODO: this is not very well done. it should check this some other way input.fire = emoticon_selector_active ? 0 : inp_key_pressed(config.key_fire); input.hook = inp_key_pressed(config.key_hook); - - //input.blink = inp_key_pressed('S'); + // Weapon switching - if(inp_key_pressed(config.key_weapon1)) input.activeweapon = 0; - if(inp_key_pressed(config.key_weapon2)) input.activeweapon = 1; - if(inp_key_pressed(config.key_weapon3)) input.activeweapon = 2; - if(inp_key_pressed(config.key_weapon4)) input.activeweapon = 3; + if(inp_key_pressed(config.key_next_weapon)) input.activeweapon = -1; + if(inp_key_pressed(config.key_prev_weapon)) input.activeweapon = -2; + if(inp_key_pressed(config.key_weapon1)) input.activeweapon = 1; + if(inp_key_pressed(config.key_weapon2)) input.activeweapon = 2; + if(inp_key_pressed(config.key_weapon3)) input.activeweapon = 3; + if(inp_key_pressed(config.key_weapon4)) input.activeweapon = 4; } // stress testing |