Open BugCode1 opened 4 months ago
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.
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.
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.
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.
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.
Yes. But in any case, it is better to synchronize things like this by onesync.
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
https://github.com/citizenfx/fivem/assets/26005436/58d52482-1e4d-413b-a992-268aa7754ad1
Importancy
Slight inconvenience
Area(s)
FiveM
Specific version(s)
All Versions
Additional information
No response