From cccc0c25b903599c081e3216b4fad1b3c7507b28 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 19 Mar 2020 22:13:50 +0100 Subject: SoundsGoodMan --- src/ft_key_events.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/ft_key_events.c') diff --git a/src/ft_key_events.c b/src/ft_key_events.c index edacc42..52ef477 100644 --- a/src/ft_key_events.c +++ b/src/ft_key_events.c @@ -10,7 +10,6 @@ /* */ /* ************************************************************************** */ -#include #include #include #include @@ -38,6 +37,12 @@ int return (ft_f1_key(clist)); else if (keycode == FT_SPC_KEY && clist->plist.handles_weapon > -1) return (ft_space_key(clist)); + else if (keycode == FT_ONE_KEY && clist->plist.fire == 0 + && clist->plist.has_weapon[0] == 1 && clist->plist.handles_weapon != 0) + return (ft_switch_weap_one(clist)); + else if (keycode == FT_TWO_KEY && clist->plist.fire == 0 + && clist->plist.has_weapon[1] == 1 && clist->plist.handles_weapon != 2) + return (ft_switch_weap_two(clist)); ft_insert_key(keycode, clist); return (0); } -- cgit v1.2.3