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

Crowbar uses incorrect time base for nextthink value #2296

Closed
SamVanheer opened this issue Apr 25, 2019 · 5 comments
Closed

Crowbar uses incorrect time base for nextthink value #2296

SamVanheer opened this issue Apr 25, 2019 · 5 comments
Assignees

Comments

@SamVanheer
Copy link

When the Crowbar is swung and something is hit a delayed response is created using a think function. Unfortunately the code was incorrectly updated when weapon prediction was implemented:

pev->nextthink = UTIL_WeaponTimeBase() + 0.2;

This should be using gpGlobals->time.

@JulianHeuser
Copy link

Just wondering, what's the consequences of this in-game? Would this fix the rapid crowbar bug?

@SamVanheer
Copy link
Author

No this doesn't affect that, #617 tracks that bug.

The consequences of this are that the next think time is in the past and so will run more quickly than intended. For correctness the time should be at some point >= current time. It may also be responsible for occasional longer delays between hits, i'm not sure about that.

@mikela-valve mikela-valve self-assigned this Apr 25, 2019
@mikela-valve mikela-valve added this to the Next Release milestone Apr 25, 2019
@mikela-valve
Copy link
Member

Fixed, will be included in next beta update.

@mikela-valve
Copy link
Member

mikela-valve commented May 21, 2019

Fixed in beta 'Exe build: 11:12:36 May 21 2019 (8244)'.

@mikela-valve
Copy link
Member

Closing as fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants