From c16d00591be623e0b1d6377e6dda7007c0e0d6c4 Mon Sep 17 00:00:00 2001 From: Ignacio Etcheverry Date: Tue, 29 Aug 2017 07:15:46 +0200 Subject: DocData and type hints fixes - Makes vararg methods automatically use PROPERTY_USAGE_NIL_IS_VARIANT on return types - Completely removes the ":type" suffix for method names. Virtual methods must use the MethodInfo constructors that takes Variant::Type or PropertyHint as the first parameter for the return type (with CLASS_INFO as a helper to get the PropertyInfo). Parameters must use PROPERTY_HINT_RESOURCE_TYPE and hint string. - PROPERTY_USAGE_NIL_IS_VARIANT is no longer needed for parameters, because parameters cannot be void. - Adds missing PROPERTY_USAGE_NIL_IS_VARIANT to virtual and built-in methods that return Variant. --- scene/3d/physics_body.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scene/3d/physics_body.cpp') diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp index b149dcd2dc..a0a393e8ed 100644 --- a/scene/3d/physics_body.cpp +++ b/scene/3d/physics_body.cpp @@ -842,7 +842,7 @@ void RigidBody::_bind_methods() { ClassDB::bind_method(D_METHOD("get_colliding_bodies"), &RigidBody::get_colliding_bodies); - BIND_VMETHOD(MethodInfo("_integrate_forces", PropertyInfo(Variant::OBJECT, "state:PhysicsDirectBodyState"))); + BIND_VMETHOD(MethodInfo("_integrate_forces", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsDirectBodyState"))); ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Rigid,Static,Character,Kinematic"), "set_mode", "get_mode"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass"); -- cgit v1.2.3