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

[GAME] Spamming sprint button depletes your stamina. #334

Open
Wikot235 opened this issue Nov 26, 2024 · 1 comment
Open

[GAME] Spamming sprint button depletes your stamina. #334

Wikot235 opened this issue Nov 26, 2024 · 1 comment
Labels
Bug Something isn't working

Comments

@Wikot235
Copy link

Describe the bug

When you spam your sprint button while not moving, your stamina gets depleted.

Steps to reproduce

Steps to reproduce the behavior:

  1. Load into a map
  2. Get an HEV Suit
  3. Spam your sprint button really quickly
  4. After some time, your stamina level will start lowering.

Expected behavior

A clear and concise description of what you expected to happen.

If the player isn't running, then we shouldn't take stamina from him.


Additional context

(Optional) Add any other context about the problem here.

@Wikot235 Wikot235 added the Bug Something isn't working label Nov 26, 2024
@Cvoxalury
Copy link

Note: this isn't wholly a 'bug' as, per the explanation in hl2_player.cpp, in CHL2_Player::SuitPower_RemoveDevice(const CSuitPowerDevice &device), it is said that this is a "a defense against exploits where the player could rapidly tap sprint and never run out of power".
Indeed, removing the SuitPower_Drain(device.GetDeviceDrainRate() * 0.1f); from it prevents running out of suit power when tapping the button. And it makes it easy to exploit.
Perhaps an extra check could be added there to only do that if the player isn't stationary. Or perhaps it should be left alone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants