single button burst

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5318 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Rafael Barreto
2010-07-08 21:28:32 +00:00
parent 5ee55a05c1
commit 8cfb76929f
2 changed files with 20 additions and 18 deletions
+19 -17
View File
@@ -1156,23 +1156,6 @@ bool cpistol::reload()
if(owner==player1 && r) { bursting = false; }
return r;
}
void cpistol::setburst(bool enable)
{
if(this == owner->weaponsel && !reloading && owner->state == CS_ALIVE)
{
bursting = enable;
}
}
void setburst(bool enable)
{
if(player1->weaponsel->type != GUN_CPISTOL) return;
if(intermission) return;
cpistol *cp = (cpistol *)player1->weaponsel;
cp->setburst(enable);
}
COMMAND(setburst, ARG_DOWN);
bool cpistol::attack(vec &targ) // modded from gun::attack // FIXME
{
@@ -1234,6 +1217,25 @@ bool cpistol::attack(vec &targ) // modded from gun::attack // FIXME
return true;
}
void cpistol::setburst(bool enable)
{
if(this == owner->weaponsel && !reloading && owner->state == CS_ALIVE)
{
bursting = enable;
}
}
void setburst(bool enable)
{
if(player1->weaponsel->type != GUN_CPISTOL) return;
if(intermission) return;
cpistol *cp = (cpistol *)player1->weaponsel;
cp->setburst(enable);
attack(enable);
}
COMMAND(setburst, ARG_DOWN);
// pistol
pistol::pistol(playerent *owner) : gun(owner, GUN_PISTOL) {}