Skip to content

[Feature Request] Track number of ticks weapon was equipped before attacking #108

Description

@tyleralbee

Problem

Equipping a weapon too early before attacking allows the other player to pray reactively. There is no tracking for this.

Solution

Track the number of ticks that a player's weapon is equipped before attacking with it.

Additional Information

Imagine a 5-tick range weapon that you've just attacked with:

  1. Server: Attack with range weapon
  2. Nothing
  3. Nothing
  4. Server: Equip melee weapon
  5. Nothing
  6. Nothing
  7. Server: Attack with melee weapon

So, on tick 3, the other player sees your melee switch, and they're able to reactively protect from melee on tick 4, tick 5, or tick 6. If you instead click your melee switch after tick 5 and attack with it on tick 6, you'll attack your opponent on the same tick your weapon is equipped, and they can't reactively protect from melee.

Implementation

I assume that this would require the plugin to poll for more than just attacks. I am guessing (I haven't read the code) that the plugin doesn't poll the game state each tick. The feature I'm suggesting would require the plugin to be polling each tick.

I am willing to get to know the code and implement this feature if the maintainers are open to it. But, if I'm guessing correctly about how the plugin currently works (i.e., that it doesn't poll game state each tick), it'd be closer to a rewrite than a feature. If maintainers are willing to merge a PR that changes the plugin so fundamentally, I'm down to put one together.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions