fix: revolver alt fire becomes inactive on switch

This commit is contained in:
Sara 2025-08-11 17:59:12 +02:00
parent 9e3de9c29a
commit b29966ccf7

View file

@ -190,6 +190,7 @@ void Revolver::notify_selected() {
} }
void Revolver::notify_deselected() { void Revolver::notify_deselected() {
this->alt_active = false;
get_input()->disconnect(PlayerInput::sig_primary_fire, callable_mp(this, &self_type::on_primary_fire)); get_input()->disconnect(PlayerInput::sig_primary_fire, callable_mp(this, &self_type::on_primary_fire));
get_input()->disconnect(PlayerInput::sig_alt_mode, callable_mp(this, &self_type::on_alt_mode)); get_input()->disconnect(PlayerInput::sig_alt_mode, callable_mp(this, &self_type::on_alt_mode));
get_input()->disconnect(PlayerInput::sig_reload, callable_mp(this, &self_type::on_reload)); get_input()->disconnect(PlayerInput::sig_reload, callable_mp(this, &self_type::on_reload));