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

Doors poor sync issue #2563

Open
BugCode1 opened this issue May 26, 2024 · 6 comments
Open

Doors poor sync issue #2563

BugCode1 opened this issue May 26, 2024 · 6 comments
Labels
bug triage Needs a preliminary assessment to determine the urgency and required action

Comments

@BugCode1
Copy link

What happened?

This is one of the old and impactful issues that, if resolved, could be very beneficial.

If someone opens a door at a certain point in the city and another person moves towards that location from a distance, the door will not appear open for the person who has recently entered the area. Additionally, you can kill that person while the doors appear closed to them.

Expected result

The state of the door should be synced for people who have recently entered that location.

Reproduction steps

  1. Open a door in a place of map with gun shot
  2. Another player moves to that position from a distant location
door_sync.mp4

Importancy

Slight inconvenience

Area(s)

FiveM

Specific version(s)

All Versions

Additional information

No response

@BugCode1 BugCode1 added bug triage Needs a preliminary assessment to determine the urgency and required action labels May 26, 2024
@Heisenberg691
Copy link

These doors are not networked, they are not synced. Thats expected behavior when the other player was too far away; the door at the time of opening probably wasn't rendered for him. You can sync their open/closed state using events to each client with a door system script. But I don't think you can sync the door's open ratio, especially when the door is opened by a gun fire.

@BugCode1
Copy link
Author

Yes, I am fully aware of this, and that is precisely why I am opening this issue.

In my opinion, if the final position of the doors is synced once when players enter within 100 meters of the area, the problem will be resolved. This is because beyond a certain distance, the doors automatically return to their synced state. Therefore, it would be best if the doors are synced once when they are rendered for the player.

@Heisenberg691
Copy link

The problem can't be resolved like that, because these objects are not networked, every client has its own copy. There is no server side position/rotation to sync. Which client's data you are gonna trust to be synced, there is no "entity owner". I don't think thats fivem issue.

@Mathu-lmn
Copy link

The doors are not "synced" as said. If you're in the scope of the door and it's loaded, then the physics of the gunfire WILL make the door open. Since your friend wasn't in the scope at the time, for his client, the door was loaded and nothing happened to it until he reached it so it's closed.

@MehdiBenbahri
Copy link

This is not a bug, it must be a suggestion.

As others have said, the doors are not synced by default.
I know that for most RP servers, they have to fix it with a script that also handles door locking (this prevents players from going through the doors of a police station, taking police uniforms and going to the Yellow jack to get BCSO free drinks).

Maybe timing that door to every gunshot will be a bit overkill...
Most of the time we don't need this precision, a script that synchronizes the gates with a thread will suffice in most cases.

Although it is true that having synchronized doors would be the most effective way.

@BugCode1
Copy link
Author

Yes. But in any case, it is better to synchronize things like this by onesync.

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

No branches or pull requests

4 participants