From 04eddacd65fd3da680e3d896368cb766b377e6e2 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sun, 31 Aug 2008 21:50:14 +0000 Subject: setting of correct game type in game controller. fixed gametype filter in browser. various cleanups --- src/game/client/components/controls.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/game/client/components/controls.cpp') diff --git a/src/game/client/components/controls.cpp b/src/game/client/components/controls.cpp index 0cf8b861..6cb89836 100644 --- a/src/game/client/components/controls.cpp +++ b/src/game/client/components/controls.cpp @@ -65,6 +65,16 @@ void CONTROLS::on_init() { static INPUTSET set = {this, &input_data.prev_weapon, 0}; MACRO_REGISTER_COMMAND("+prevweapon", "", con_key_input_nextprev_weapon, (void *)&set); } } +void CONTROLS::on_message(int msg, void *rawmsg) +{ + if(msg == NETMSGTYPE_SV_WEAPONPICKUP) + { + NETMSG_SV_WEAPONPICKUP *msg = (NETMSG_SV_WEAPONPICKUP *)rawmsg; + if(config.cl_autoswitch_weapons) + input_data.wanted_weapon = msg->weapon+1; + } +} + int CONTROLS::snapinput(int *data) { static NETOBJ_PLAYER_INPUT last_data = {0}; -- cgit 1.4.1