Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

G6DOF_JOINT_FLAG_MAX (and a few others) is not defined in godot-4.0.2-stable tag #1104

Closed
z80 opened this issue Apr 30, 2023 · 0 comments · Fixed by godotengine/godot#89851
Closed
Labels
bug This has been identified as a bug

Comments

@z80
Copy link

z80 commented Apr 30, 2023

Hello!

It seems like servers/physics_server_3d.h in godot.git and godot_cpp/classes/physics_server3d.hpp in godot_cpp.git do not correspond to each other.

For example, G6DOF_JOINT_FLAG_MAX is not defined in godot_cpp/classes/physics_server3d.hpp. It's enum G6DOFJointAxisFlag has much fewer fields defined compared to the same enum inside servers/physics_server_3d.h.

Appropriate JSON piece being generated with godot-4.0.2-stable using the command
godot --dump-extension-api extension_api.json

looks like this (has only 4 fields):

				{
					"name": "G6DOFJointAxisFlag",
					"is_bitfield": false,
					"values": [
						{
							"name": "G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT",
							"value": 0
						},
						{
							"name": "G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT",
							"value": 1
						},
						{
							"name": "G6DOF_JOINT_FLAG_ENABLE_MOTOR",
							"value": 4
						},
						{
							"name": "G6DOF_JOINT_FLAG_ENABLE_LINEAR_MOTOR",
							"value": 5
						}
					]
				},

which makes it generated file godot_cpp/gen/godot_cpp/include/classes/physics_server3d.hpp to have it like this:

	enum G6DOFJointAxisFlag {
		G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT = 0,
		G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT = 1,
		G6DOF_JOINT_FLAG_ENABLE_MOTOR = 4,
		G6DOF_JOINT_FLAG_ENABLE_LINEAR_MOTOR = 5,
	};

whereas actual enum inside godot PhysicsServer3D looks like this (has 7 fields):

	enum G6DOFJointAxisFlag {
		G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT,
		G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT,
		G6DOF_JOINT_FLAG_ENABLE_ANGULAR_SPRING,
		G6DOF_JOINT_FLAG_ENABLE_LINEAR_SPRING,
		G6DOF_JOINT_FLAG_ENABLE_MOTOR,
		G6DOF_JOINT_FLAG_ENABLE_LINEAR_MOTOR,
		G6DOF_JOINT_FLAG_MAX
	};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This has been identified as a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants