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

Network synchronized scenes will fail for remote clients with >2 clients present. #2910

Open
Lucas7yoshi opened this issue Nov 4, 2024 · 5 comments · May be fixed by #3149
Open

Network synchronized scenes will fail for remote clients with >2 clients present. #2910

Lucas7yoshi opened this issue Nov 4, 2024 · 5 comments · May be fixed by #3149
Labels
bug triage Needs a preliminary assessment to determine the urgency and required action

Comments

@Lucas7yoshi
Copy link
Contributor

Lucas7yoshi commented Nov 4, 2024

What happened?

When running network synchronized scenes, remote clients will occasionally observe the player ped in the scene "fall out" of the scene, either by going into idle pose, or falling about 3 meters down (through collision)

This does not occur for just two clients, and appears to worsen the more clients that are there.

Expected result

Network synchronized scenes should not fail for remote clients.

Reproduction steps

  1. Have four or more clients in one area
  2. Have one, or all run synchronized scene(s) with or without prop elements
  3. Observe the scenes aborting/failing/exiting.

Footage of four clients running scenes from the perspective of two. The scene has no props and only characters.
https://github.com/user-attachments/assets/6569ba32-cd37-4fba-a17a-2ac65346b96a
Code for above provided: https://gist.github.com/Lucas7yoshi/c9ff818f55ecd3b5540e0b3a3d30366e

Footage of four clients running scenes from the perspective of two. With props, same issue.

FiveM_cl2_b3258_GTAProcess_wK9C2p7t5M.mp4

Importancy

Unknown

Area(s)

FiveM, FXServer, OneSync

Specific version(s)

FiveM, All game builds, all game servers

Additional information

When a character falls out of the scene for remote players, all remote players see that happen in sync. On the executing clients end, nothing is wrong.

This happens even with networksynchronizedscenes which contain only one ped, and no objects.

This seems to worsen with a lot of scenes firing off (as is often required for certain mechanics, especially interactive sequences seen in GTA Online like casino lockboxes and grabbing cash anims which will trigger like a scene a second.)

"Array handlers" were mentioned as being the culprit of this when i had mentioned it prior.

As seen in my code, nothing is done to the peds involved or the scene up until it hits the 0.8 phase.

@Lucas7yoshi Lucas7yoshi added bug triage Needs a preliminary assessment to determine the urgency and required action labels Nov 4, 2024
@Lucas7yoshi Lucas7yoshi changed the title Network synchronized scenes will fail for remote clients with >3 clients present. Network synchronized scenes will fail for remote clients with >2 clients present. Nov 7, 2024
@TheGamerzs
Copy link
Contributor

I've been able to reproduce this for two local clients, and it fails immediately.
(No animation on the second client at all)

Falling through the map happens since the syncFlag in the example code is 0.

@Lucas7yoshi
Copy link
Contributor Author

I've been able to reproduce this for two local clients, and it fails immediately. (No animation on the second client at all)

Falling through the map happens since the syncFlag in the example code is 0.

From my knowledge there is no flags which dictate syncing. my only thought is that the other client doesn't have the animation dictionaries loaded and it doesn't support IFR loading (I think that's the right term)

@TheGamerzs
Copy link
Contributor

When a client has a low fps 2-30fps it seems others don't fall and or as quickly.
(It seems since it hasn't been processed that the other ped has stopped the scene, just that it's doing another scene).

Not sure if useful, when the ped does stop the animation, its when this \/ Node changes from 45 -> 0 -> 45
image

Recording.2024-11-29.231904.mp4

From my knowledge there is no flags which dictate syncing. my only thought is that the other client doesn't have the animation dictionaries loaded and it doesn't support IFR loading (I think that's the right term)

The syncFlag is when you add a ped to the scene, in the example

NetworkAddPedToSynchronisedScene(playerPed, scene, dict, "action_male", 1000.0, 1000.0, 0, 4 + 65536, 1000.0, 8192)
4 + 65536 is being passed as ragdollFlags, the 0 before is the syncFlag

@Lucas7yoshi
Copy link
Contributor Author

The sync flags just control some relativrly niche stuff. 0 is as far as I'm aware a perfectly acceptable value and shouldn't affect network sync. the last 8192 is for facial animations and the ragdoll value is deliberate aswell.

the flags there are the same as for the local ones so shouldn't affect sync but I suppose it's possible. nonetheless appreciate your contribution to the matter though!

@Lucas7yoshi
Copy link
Contributor Author

a note that I'm not too sure how helpful it is: I tested this on 1604 and with a server build before ccb9a81 to see if it was a regression, but I can confirm it is not (or atleast if it was, it was before that)

admittedly I'm not too sure the implications of the commit but it seemed relevant so I tested it.

@tens0rfl0w tens0rfl0w linked a pull request Feb 11, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Needs a preliminary assessment to determine the urgency and required action
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants