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.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/game/client/game_client.cpp b/src/game/client/game_client.cpp
index c34e81ce..e5d874d2 100644
--- a/src/game/client/game_client.cpp
+++ b/src/game/client/game_client.cpp
@@ -1174,8 +1174,13 @@ void modc_render()
 			input.blink = inp_key_pressed('S');
 			
 			// Weapon switching
-			for(int i = 0; i < 8; i++)
-				input.activeweapon = inp_key_pressed('1'+i) ? i : input.activeweapon;
+#define TEST_WEAPON_KEY(key) if (inp_key_pressed(config.key_weapon ## key)) input.activeweapon = key-1;
+			TEST_WEAPON_KEY(1);
+			TEST_WEAPON_KEY(2);
+			TEST_WEAPON_KEY(3);
+			TEST_WEAPON_KEY(4);
+			//for(int i = 0; i < 8; i++)
+			//	input.activeweapon = inp_key_pressed('1'+i) ? i : input.activeweapon;
 		}
 
 		snap_input(&input, sizeof(input));