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
+1 -1
View File
@@ -421,7 +421,7 @@ itemstat ammostats[NUMGUNS] =
{60, 90, 90, S_ITEMAMMO}, //subgun
{10, 20, 15, S_ITEMAMMO}, //sniper
{40, 60, 60, S_ITEMAMMO}, //assault
{30, 30, 75, S_ITEMAMMO}, //cpistol
{30, 45, 75, S_ITEMAMMO}, //cpistol
{1, 0, 3, S_ITEMAMMO}, //grenade
{72, 0, 72, S_ITEMAKIMBO} //akimbo
};
+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) {}