diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-08-31 21:50:14 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-08-31 21:50:14 +0000 |
| commit | 04eddacd65fd3da680e3d896368cb766b377e6e2 (patch) | |
| tree | 4e99da87a56b59901e4752d7ac8d593a93ecd508 /src/game/client/components/controls.cpp | |
| parent | 62d9ff05d6cc0ae1cd952d51a168f6ffcf6abf60 (diff) | |
| download | zcatch-04eddacd65fd3da680e3d896368cb766b377e6e2.tar.gz zcatch-04eddacd65fd3da680e3d896368cb766b377e6e2.zip | |
setting of correct game type in game controller. fixed gametype filter in browser. various cleanups
Diffstat (limited to 'src/game/client/components/controls.cpp')
| -rw-r--r-- | src/game/client/components/controls.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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}; |