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.38k stars 425 forks source link

detachTrailerFromVehicle is very inconsistent #694

Open Grafu opened 5 years ago

Grafu commented 5 years ago

Describe the bug

• Calling clientside detachTrailerFromVehicle fails to remove the trailer most of the time and stops working anymore until serverside detachTrailerFromVehicle is called.

• Calling serverside detachTrailerFromVehicle fails to remove the trailer most of the time (the detaching click is heard, but trailer is re-attached by MTA right after detaching. I guess it's the trailer desync fix what causes the problem).

To reproduce

/cv 403 /cv some trailer /srun detachTrailerFromVehicle(getPedOccupiedVehicle(getRandomPlayer()))

Expected behaviour

• detachTrailerFromVehicle clientside should detach the trailer, not only click without actually removing the trailer.

• detachTrailerFromVehicle serverside should detach the trailer and stop applying trailer sync fix after the function is called.

Version

MTA:SA Server v1.5.6-release-14489 Multi Theft Auto v1.5.6-release-14738

Related #445, #449

Pirulax commented 5 years ago

the whole trailer sync should be fixed