diff --git a/source/src/weapon.cpp b/source/src/weapon.cpp index 87ff1a8a..36130927 100644 --- a/source/src/weapon.cpp +++ b/source/src/weapon.cpp @@ -1148,6 +1148,8 @@ bool assaultrifle::selectable() { return weapon::selectable() && !m_noprimary && cpistol::cpistol(playerent *owner) : gun(owner, GUN_CPISTOL), bursting(false) {} bool cpistol::selectable() { return weapon::selectable() && !m_noprimary && this == owner->primweap; } +void cpistol::onselecting() { weapon::onselecting(); bursting = false; } +void cpistol::ondeselecting() { bursting = false; } void cpistol::setburst(bool enable) { if(this == owner->weaponsel && !reloading && owner->state == CS_ALIVE) @@ -1164,7 +1166,7 @@ void setburst(bool enable) cp->setburst(enable); } -COMMAND(setburst, ARG_1INT); +COMMAND(setburst, ARG_DOWN); bool cpistol::attack(vec &targ) // modded from gun::attack // FIXME { diff --git a/source/src/weapon.h b/source/src/weapon.h index 174adc07..38406462 100644 --- a/source/src/weapon.h +++ b/source/src/weapon.h @@ -146,8 +146,10 @@ struct cpistol : gun { bool bursting; cpistol(playerent *owner); - bool attack(vec &targ); bool selectable(); + void onselecting(); + void ondeselecting(); + bool attack(vec &targ); void setburst(bool enable); };