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

Revise PVP Block and Hit Recovery handling #7097

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kphoenix137
Copy link
Collaborator

@kphoenix137 kphoenix137 commented Apr 21, 2024

This is an effort to combat desync in player vs player interactions. In vanilla, damage is sent via network message by the attacker, but blocking and hit recovery are handled client sided, leading to desync. This ensures that when the attacker successfully hits (or I guess starts the sequence of events that leads to damage/blocking/hit recovery), only then will PvP based hit recovery and blocking take place. Additionally, this also fixes the issue caused by unsynced RNG, where the result of a block calculation will be different per client. The attacker will perform the calculation, and the defender will receive the result of that calculation and be forced to block accordingly.

I have also cleaned up Plr2PlrMHit() and PlrHitPlr() during my effort to avoid any bugs during this implementation.

@kphoenix137 kphoenix137 marked this pull request as ready for review April 21, 2024 06:37
@D1-Constantine
Copy link

Awesome stuff, quite nice to imagine what will be possible in terms of gameplay in the arena :)

@kphoenix137 kphoenix137 changed the title Refactor/revise PVP functions Revise PVP Block and Hit Recovery handling May 9, 2024
@kphoenix137 kphoenix137 marked this pull request as draft May 11, 2024 03:03
@kphoenix137
Copy link
Collaborator Author

Currently doesn't work as intended

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.

None yet

2 participants