From 090bcb96c8a29a5326123d5846935800d42e0e8a Mon Sep 17 00:00:00 2001 From: Allanis Date: Mon, 30 Sep 2013 22:34:46 +0100 Subject: [PATCH] [Add] You can now cancel beams as secondary weapon instead of having to hold shift. --- src/player.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/player.c b/src/player.c index 42019ba..7eb426a 100644 --- a/src/player.c +++ b/src/player.c @@ -1403,11 +1403,16 @@ void player_think(Pilot* pplayer) { /* Secondary. */ if(player_isFlag(PLAYER_SECONDARY)) { - pilot_shoot(pplayer, player_target, 0); + /* Double tap stops beams. */ + if(!player_isFlag(PLAYER_SECONDARY_L) && + (pplayer->secondary != NULL) && + outfit_isBeam(pplayer->secondary->outfit)) { + pilot_shootStop(pplayer, 1); + } else + pilot_shoot(pplayer, player_target, 1); player_setFlag(PLAYER_SECONDARY_L); } else if(player_isFlag(PLAYER_SECONDARY_L)) { - pilot_shootStop(pplayer, 0); player_rmFlag(PLAYER_SECONDARY_L); }