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 a bug that prevents players from diving right after spawning the first time on da_official #36

Merged
merged 1 commit into from
Mar 29, 2016
Merged

Fix a bug that prevents players from diving right after spawning the first time on da_official #36

merged 1 commit into from
Mar 29, 2016

Conversation

TomyLobo
Copy link
Collaborator

This patch resets the "last known ground entity" field right after calling CBasePlayer::Spawn

This fixes the bug that prevents players from diving right after spawning the first time on da_official.
The bug also occurs after you switch from spectator to normal mode.

Explanation:
CBasePlayer::Spawn invoked ClearFlags, clearing, among others, FL_ONGROUND.
However, it did not invoke SetGroundEntity(NULL); in order to remove the world entity from the "last ground entity" field.
This, in turn, made subsequent calls to SetGroundEntity do nothing, since that function returns early if the "last ground entity" field is the same as its parameter.
So despite FullWalkMove happily calling SetGroundEntity($worldentity) all the time, FL_ONGROUND wasn't set.

This patch works, but I'm not sure if this is the correct place to but the SetGroundEntity(NULL); call.

Same changes as #32 but retargeted to the develop branch.

@TomyLobo TomyLobo force-pushed the develop branch 2 times, most recently from 5e4152f to ba8390e Compare March 27, 2016 01:50
This fixes the bug that prevents players from diving right after spawning the first time on da_official.
The bug also occurs after you switch from spectator to normal mode.
@BSVino
Copy link
Owner

BSVino commented Mar 29, 2016

Ship it.

@TomyLobo TomyLobo merged commit f9b059a into BSVino:develop Mar 29, 2016
@TomyLobo TomyLobo deleted the fix-da_official-first-spawn-dive branch March 29, 2016 01:54
@TomyLobo TomyLobo added this to the v1.2.1 milestone Apr 3, 2016
@TomyLobo TomyLobo changed the title Fix the bug that prevents players from diving right after spawning the first time on da_official Fixed a bug that prevents players from diving right after spawning the first time on da_official Apr 3, 2016
@TomyLobo TomyLobo changed the title Fixed a bug that prevents players from diving right after spawning the first time on da_official Fix a bug that prevents players from diving right after spawning the first time on da_official Apr 3, 2016
TomyLobo added a commit that referenced this pull request Apr 20, 2016
Fix the bug that prevents players from diving right after spawning the first time on da_official
shmopaloppa pushed a commit to shmopaloppa/DoubleAction that referenced this pull request Sep 13, 2017
…n-dive

Fix the bug that prevents players from diving right after spawning the first time on da_official
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants