Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Issue #173 - Fix Bow Sustained Firing #174

Open
wants to merge 9 commits into
base: barony-next
Choose a base branch
from
11 changes: 6 additions & 5 deletions src/acthudweapon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,17 +463,18 @@ void actHudWeapon(Entity* my)
{
if ( stats[clientnum]->weapon->type == SLING || stats[clientnum]->weapon->type == SHORTBOW || stats[clientnum]->weapon->type == ARTIFACT_BOW )
{
if ( !stats[clientnum]->defending && !throwGimpTimer )
if ( throwGimpTimer == 0 )
{
// bows need to be drawn back
if (!bowDrawingSoundPlaying)
// Bows need to be drawn back
if ( !bowDrawingSoundPlaying )
{
if (bowFire)
if ( bowFire )
{
bowFire = false;
bowDrawingSound = nullptr;
players[clientnum]->entity->attack(0, 0, nullptr);
HUDWEAPON_MOVEX = 3;
throwGimpTimer = TICKS_PER_SECOND / 4;
throwGimpTimer = 12; // Was TICKS_PER_SECOND / 4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason for this change? Having it defined as "a quarter of a second" seems better than having it defined as "12 ticks", which would change firing behaviour if the tick rate is changed.

}
else
{
Expand Down