Skip to content

Conversation

@SimoSbara
Copy link

This PR references openmultiplayer/open.mp/1163.

@AmyrAhmady
Copy link
Member

You should not move function position from its own place to another
Adding a parameter already breaks ABI compatibility, but moving the position would break it for every other function in this table as well
Please fix it by moving it back to its own original position

{
virtual void attachToObject(IPlayerObject& object, Vector3 offset, Vector3 rotation) = 0;
/// Attach the object to another player object
virtual void attachToObject(IPlayerObject& object, Vector3 offset, Vector3 rotation, bool syncRotation) = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please keep the original method in place with the same number of args it had before and just add another one at the end of the table with that extra param?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, like that?

struct IPlayerObject : public IBaseObject
{
	/// Attach the object to a player
	virtual void attachToPlayer(IPlayer& player, Vector3 offset, Vector3 rotation) = 0;

	/// Attach the object to another player object
	virtual void attachToObject(IPlayerObject& object, Vector3 offset, Vector3 rotation, bool syncRotation) = 0;
};

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like:

struct IPlayerObject : public IBaseObject
{
	// Attach the object to another object (rotation is always synced)
	virtual void attachToObject(IPlayerObject& object, Vector3 offset, Vector3 rotation) = 0;

	/// Attach the object to a player
	virtual void attachToPlayer(IPlayer& player, Vector3 offset, Vector3 rotation) = 0;

	/// Attach the object to another object (with rotation sync option)
	virtual void attachToObject(IPlayerObject& object, Vector3 offset, Vector3 rotation, bool syncRotation) = 0;
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants