server-beta icon indicating copy to clipboard operation
server-beta copied to clipboard

syncRotation in AttachPlayerObjectToObject() has no effect

Open douq opened this issue 8 months ago • 1 comments

Describe the bug According to the documentation, the function AttachPlayerObjectToObject() has a parameter syncRotation, which defaults to true. However, I noticed that setting this parameter to false has no effect. If I'm interpreting the code correctly, the parameter isn't actually passed on, and in the implementation, it's always set to true.

To Reproduce Link to Wiki AttachPlayerObjectToObject(playerid, objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotationX, Float:rotationY, Float:rotationZ, bool:syncRotation = true)

https://github.com/openmultiplayer/open.mp/blob/b4e4e99cada336252982be6a77ed4b08398301cd/Server/Components/Pawn/Scripting/Object/PlayerNatives.cpp#L56

https://github.com/openmultiplayer/open.mp/blob/master/Server/Components/Objects/object.hpp#L498

Expected behavior Setting syncRotation has a effect.

Release version Latest build

douq avatar May 01 '25 08:05 douq

setAttachmentData actually has a sync parameter but it's set to true when calling it here: https://github.com/openmultiplayer/open.mp/blob/master/Server/Components/Objects/object.hpp#L500

Konstantinos-Sk avatar Sep 25 '25 16:09 Konstantinos-Sk