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

Added fall damage and /kill #959

Merged
merged 8 commits into from
Jan 25, 2025

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)

src/Inventory.zig Outdated Show resolved Hide resolved
src/Inventory.zig Outdated Show resolved Hide resolved
src/Inventory.zig Outdated Show resolved Hide resolved
src/Inventory.zig Outdated Show resolved Hide resolved
src/Inventory.zig Show resolved Hide resolved
src/server/Entity.zig Show resolved Hide resolved
src/Inventory.zig Show resolved Hide resolved
src/Inventory.zig Show resolved Hide resolved
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