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

Fix #467 Ped animations don't sync for new players #3520

Merged
merged 18 commits into from
Jan 3, 2025

Conversation

FileEX
Copy link
Contributor

@FileEX FileEX commented Jun 29, 2024

Fixed #467

@Dutchman101
Copy link
Member

Awesome! Hope this gets a bunch of code reviews..

Server/mods/deathmatch/logic/CPed.h Outdated Show resolved Hide resolved
Server/mods/deathmatch/logic/CPed.h Outdated Show resolved Hide resolved
Server/mods/deathmatch/logic/CPed.h Outdated Show resolved Hide resolved
@tederis tederis added the bugfix Solution to a bug of any kind label Jun 29, 2024
@tederis
Copy link
Member

tederis commented Jun 29, 2024

Good job. But there's a problem. Animations can be interrupted on a client and that information won't be available for a server. This will break the animation consistency and lead to a desync for just joined new players. There have to be a mechanism for an animation's data invalidation.

@FileEX FileEX marked this pull request as draft July 2, 2024 14:50
@FileEX
Copy link
Contributor Author

FileEX commented Jul 14, 2024

I introduced an animation validation mechanism. It supports:

  • Interrupted animation on the client side (damage, explosion, death, etc.).

  • Animation time has ended

  • Animation was overwritten/changed by setPedAnimation on the client side

  • Animation was killed by setPedAnimationProgress

I tested it on a local server with peds and the tests were successful.

@FileEX FileEX marked this pull request as ready for review July 14, 2024 19:48
@FileEX FileEX requested a review from tederis July 14, 2024 20:02
Copy link
Contributor

@Fernando-A-Rocha Fernando-A-Rocha left a comment

Choose a reason for hiding this comment

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

Congratulations

Client/mods/deathmatch/logic/CClientPed.h Outdated Show resolved Hide resolved
Client/mods/deathmatch/logic/CClientPed.h Outdated Show resolved Hide resolved
Shared/sdk/net/bitstream.h Outdated Show resolved Hide resolved
Server/mods/deathmatch/logic/packets/CEntityAddPacket.cpp Outdated Show resolved Hide resolved
Server/mods/deathmatch/logic/packets/CEntityAddPacket.cpp Outdated Show resolved Hide resolved
Server/mods/deathmatch/logic/CPed.h Outdated Show resolved Hide resolved
botder
botder previously approved these changes Jan 1, 2025
@botder botder merged commit b32eafc into multitheftauto:master Jan 3, 2025
6 checks passed
@botder botder added this to the 1.6.1 milestone Jan 3, 2025
@FileEX FileEX deleted the bugfix/animations_sync branch January 3, 2025 23:19
botder pushed a commit that referenced this pull request Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Solution to a bug of any kind
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ped animations don't sync for new players
5 participants