diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-12-07 02:04:20 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-12-07 02:04:20 -0300 |
commit | c79be979d47daae613d1b1bbc732a30a74f56543 (patch) | |
tree | 9edaf684a8d3ff47b124d03e04c01f927c197255 /scene/3d/area.cpp | |
parent | f7c9a4a0a8ab770dfe565c31c7c47585beb53594 (diff) | |
download | redot-engine-c79be979d47daae613d1b1bbc732a30a74f56543.tar.gz |
Batch of Bugfixes
-=-=-=-=-=-=-=-=-
-Fixed Export UV XForm (should work now). #923
-Fixed enforcement of limits in property editor. #919
-Fixed long-standing bug of export editings in script inheritance. #914, #859, #756
-Fixed horrible error reporting in shader language. #912
-Added kinematic collision with plane (please test well). #911
-Fixed double animation track insert when using 2D rigs. #904
-VKey updates offset parameter in sprite edition. #901
-Do not allow anymore a script to preload itself. (does not fix #899, but narrows it down)
-Avoid connection editor from overriding selected text. #897
-Fixed timer autostart. #876
-Fixed collision layers in 3D physics. #872
-Improved operators in shader #857
-Fixed ambient lighting bug #834
-Avoid editor from processing gamepad input #813
-Added not keyword #752
Please test!
Diffstat (limited to 'scene/3d/area.cpp')
-rw-r--r-- | scene/3d/area.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scene/3d/area.cpp b/scene/3d/area.cpp index cb1df78fda..9cdd24d102 100644 --- a/scene/3d/area.cpp +++ b/scene/3d/area.cpp @@ -115,6 +115,7 @@ void Area::_body_enter_tree(ObjectID p_id) { void Area::_body_exit_tree(ObjectID p_id) { + Object *obj = ObjectDB::get_instance(p_id); Node *node = obj ? obj->cast_to<Node>() : NULL; ERR_FAIL_COND(!node); @@ -132,6 +133,7 @@ void Area::_body_exit_tree(ObjectID p_id) { void Area::_body_inout(int p_status,const RID& p_body, int p_instance, int p_body_shape,int p_area_shape) { + bool body_in = p_status==PhysicsServer::AREA_BODY_ADDED; ObjectID objid=p_instance; @@ -142,6 +144,8 @@ void Area::_body_inout(int p_status,const RID& p_body, int p_instance, int p_bod ERR_FAIL_COND(!body_in && !E); + locked=true; + if (body_in) { if (!E) { @@ -197,11 +201,19 @@ void Area::_body_inout(int p_status,const RID& p_body, int p_instance, int p_bod } + locked=false; + + } void Area::_clear_monitoring() { + if (locked) { + ERR_EXPLAIN("This function can't be used during the in/out signal."); + } + ERR_FAIL_COND(locked); + Map<ObjectID,BodyState> bmcopy = body_map; body_map.clear(); //disconnect all monitored stuff @@ -235,6 +247,11 @@ void Area::_notification(int p_what) { void Area::set_enable_monitoring(bool p_enable) { + if (locked) { + ERR_EXPLAIN("This function can't be used during the in/out signal."); + } + ERR_FAIL_COND(locked); + if (p_enable==monitoring) return; @@ -325,6 +342,7 @@ Area::Area() : CollisionObject(PhysicsServer::get_singleton()->area_create(),tru space_override=SPACE_OVERRIDE_DISABLED; set_gravity(9.8);; + locked=false; set_gravity_vector(Vector3(0,-1,0)); gravity_is_point=false; density=0.1; |