Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix position desync with dead players (#928) #4453

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

Open
MohabCodeX wants to merge 2 commits into multitheftauto:master
base: master
Choose a base branch
Loading
from MohabCodeX:fix/position-desync-dead-players

Conversation

@MohabCodeX
Copy link
Contributor

@MohabCodeX MohabCodeX commented Sep 11, 2025

Dead players stopped sending position updates to server, causing getElementPosition() to return frozen death location instead of current position (e.g., after falling).
Fixed by allowing position sync for dead players on both client and server sides.

Results :

Your position: X=-710.00, Y=957.00, Z=12.40
Your position: X=-710.63, Y=957.88, Z=42.75 -> In air
Your position: X=-710.63, Y=957.88, Z=12.40 -> Dead player position after falling

// player is in.
if (!pSourcePlayer->CanUpdateSync(ucTimeContext))
// player is in. Allow position updates for dead players
if (!pSourcePlayer->CanUpdateSync(ucTimeContext) && !pSourcePlayer->IsDead())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think dead players can be synchronized if the time context doesn't match

Copy link
Member

@Dutchman101 Dutchman101 Oct 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MohabCodeX Please respond to the feedback

MohabCodeX reacted with thumbs up emoji
@ArranTuna ArranTuna added sync bugfix Solution to a bug of any kind labels Sep 20, 2025
@Dutchman101 Dutchman101 added the feedback Further information is requested label Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Dutchman101 Dutchman101 Dutchman101 left review comments

@FileEX FileEX FileEX left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

bugfix Solution to a bug of any kind feedback Further information is requested sync

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /