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:
- Server: Attack with range weapon
- Nothing
- Nothing
- Server: Equip melee weapon
- Nothing
- Nothing
- 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.
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:
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.