multitheftauto / mtasa-blue

Multi Theft Auto is a game engine that incorporates an extendable network play element into a proprietary commercial single-player game.
https://multitheftauto.com
GNU General Public License v3.0
1.42k stars 437 forks source link

Trailers desync #910

Open Pirulax opened 5 years ago

Pirulax commented 5 years ago

Describe the bug erorr404 said:

Talidan and I were playing around with trucks and trailers today, and several times the trailers became desynced. For example, I saw his truck without the trailer, even though it was on his screen. When he detached it, it disappeared from his screen as well.

To reproduce Just create a Towtruck, attach a vehicle to it and go on the Road, it'll desync

Screenshots https://www.youtube.com/watch?v=XD2JX9hZV2U

Version Even in the newest

Additional context Mantis link: https://bugs.mtasa.com/view.php?id=1655

Pirulax commented 5 years ago

What I think would be a good solution to this is to just sync if it's towed or not, because, as seen in the video, something deataches the towed vehicle.

The issue with trailers it, that they detach after a time as well.

Einheit-101 commented 5 years ago

Trailer sync is garbage even when a player is driving it, i have drivable trailers on my server and its ridiculous.

PlatinMTA commented 5 years ago

This is bound to the setting on mtaserver.conf, the vehicle attached doesn't update as quickly as it should, so you can see the trailer like behind of the vehicle meanwhile the player driving it won't see anything different. At least that it's what I think the problem comes from.

StifflersMom commented 5 years ago

I made the linked video for describing some issues with . The idea behind this things were to sync the towed vehicle even with puresync like the towing vehicle. On our server, we had a extreme low unoccupied_vehicle_sync_interval ( somewhat between 50 and 70, it's out of the limit range but it was functional). Also we made a resource, which uses detachTrailerFromVehicle client side for everyone except the tower. This made the trailer / towed vehicle update it's position more accurate than MTA itself. For some unknown reason, all this tricky things were broken with some 1.5.6-????? version. Now we have ALWAYS desynced towed vehicles, except for the tower (wromg positions, wrong angle, ...). I was talking to some devs before and they said, the towing sync and it's procedures are somewhat messed up - So someone will make a miracle come true and fix this and become a hero for all times :dancing_men:

tederis commented 5 years ago

I think, I have some progress in there https://youtu.be/iFClCa_xaG4

Citizen01 commented 5 years ago

Where is your branch tederis ?

tederis commented 5 years ago

Where is your branch tederis ?

It's still under development. The bug consists of two problems and I have fixed just one.

tederis commented 5 years ago

Unfortunately I have no time at the moment to continue the research. So I made a simple fix that didn't eliminate the source of a problem but made a trailer's behavior much more satisfactory. It can be found at https://github.com/tederis/mtasa-blue/tree/trailers_fix I think it's just a half measure so I didn't dare to made a PR.