about summary refs log tree commit diff
path: root/src/game/client/game_client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/client/game_client.cpp')
-rw-r--r--src/game/client/game_client.cpp15
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