fix the continuous burst without pressing the button

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5310 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Rafael Barreto
2010-07-08 20:29:34 +00:00
parent 1aac893c75
commit a8eb5142d5
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -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
{
+3 -1
View File
@@ -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);
};