Skip to content

Conversation

@OneAvargeCoder193
Copy link
Contributor

No description provided.

@ikabod-kee ikabod-kee mentioned this pull request Jan 23, 2025
40 tasks
Copy link
Member

@IntegratedQuantum IntegratedQuantum left a comment

Choose a reason for hiding this comment

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

From what I have gathered you do nothing on the client side. The client-side only informs the server that some damage happened.

This might be fine on its own, since health really isn't something where you necessarily need low latency, but it definitely goes against the intended use case of the InventoryCommands, which are designed to do client-side prediction with server-side validation.

If you only really need SyncOperations and a way to inform the server that the client received fall damage, then you really shouldn't define a BaseOperation and an InventoryCommand at all. You can just use a regular protocol to inform the server of the fall damage amount, and then just execute addHealth from there (which would then just lock the mutex, update the player health, and then send the sync operation back)

Copy link
Member

@IntegratedQuantum IntegratedQuantum left a comment

Choose a reason for hiding this comment

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

Looks good now, thanks for working on this.
And thanks for splitting the PR, this really made reviewing a lot more pleasant.

@IntegratedQuantum IntegratedQuantum merged commit 818f736 into PixelGuys:master Jan 25, 2025
1 check passed
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