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: retrieve and update correct player after disconnection/bot take over #468

Merged
merged 1 commit into from
Nov 12, 2023

Conversation

akiver
Copy link
Collaborator

@akiver akiver commented Nov 11, 2023

Alternative to fix #467.

This PR moves the logic inside the OnUpdate callback of m_hController outside to avoid calling pawn entity properties lifecycle when we should not.
The pawn entity props that we need to listen now retrieve the player associated with the pawn entity from the current m_hController prop value.

…over

Use the current m_hController value to retrieve the player and move the
logic out of m_hController updates.
Copy link

codecov bot commented Nov 11, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (60ef60a) 80.36% compared to head (d34da65) 80.39%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #468      +/-   ##
==========================================
+ Coverage   80.36%   80.39%   +0.03%     
==========================================
  Files          47       47              
  Lines        6259     6279      +20     
==========================================
+ Hits         5030     5048      +18     
- Misses       1019     1020       +1     
- Partials      210      211       +1     
Files Coverage Δ
pkg/demoinfocs/datatables.go 91.78% <92.00%> (-0.05%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@markus-wa
Copy link
Owner

nice work! I agree this seems like a good fix for #467

@markus-wa markus-wa merged commit 0c77732 into master Nov 12, 2023
7 checks passed
@markus-wa markus-wa deleted the fix-player-bot-disconnect branch November 12, 2023 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants