openmultiplayer / openmultiplayer/open.mp
syncRotation in AttachPlayerObjectToObject() has no effect
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 641
- Forks
- 208
- PR merge metrics
- No merged PRs in 30d
Description
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/master/Server/Components/Objects/object.hpp#L498
Expected behavior
Setting syncRotation has a effect.
Release version
Latest build
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at Server/Components/Pawn/Scripting/Object/PlayerNatives.cpp around line 56 and trace syncRotation into Server/Components/Objects/object.hpp around line 498. Reproduce the linked AttachPlayerObjectToObject signature with syncRotation set to false, then verify that false changes rotation synchronization while the default true behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100