[Add] You can now cancel beams as secondary weapon instead of having to hold shift.

This commit is contained in:
Allanis 2013-09-30 22:34:46 +01:00
parent 4d8b462359
commit 090bcb96c8

View File

@ -1403,11 +1403,16 @@ void player_think(Pilot* pplayer) {
/* Secondary. */ /* Secondary. */
if(player_isFlag(PLAYER_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); player_setFlag(PLAYER_SECONDARY_L);
} }
else if(player_isFlag(PLAYER_SECONDARY_L)) { else if(player_isFlag(PLAYER_SECONDARY_L)) {
pilot_shootStop(pplayer, 0);
player_rmFlag(PLAYER_SECONDARY_L); player_rmFlag(PLAYER_SECONDARY_L);
} }