Skip to content

Conversation

MohabCodeX
Copy link
Contributor

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

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