From 9edf98e8419ce68085a308ba4ae65fe8bf8a9f17 Mon Sep 17 00:00:00 2001 From: Stanislav Date: Sat, 8 Dec 2018 00:09:39 +0300 Subject: Disabled CollisionShape and CollisionShape2D are not processed now Fixes #24183 --- servers/physics_2d/collision_object_2d_sw.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'servers/physics_2d/collision_object_2d_sw.h') diff --git a/servers/physics_2d/collision_object_2d_sw.h b/servers/physics_2d/collision_object_2d_sw.h index f256910f52..2bf8cba572 100644 --- a/servers/physics_2d/collision_object_2d_sw.h +++ b/servers/physics_2d/collision_object_2d_sw.h @@ -115,6 +115,10 @@ public: void set_shape_metadata(int p_index, const Variant &p_metadata); _FORCE_INLINE_ int get_shape_count() const { return shapes.size(); } + _FORCE_INLINE_ bool is_shape_disabled(int p_index) const { + CRASH_BAD_INDEX(p_index, shapes.size()); + return shapes[p_index].disabled; + } _FORCE_INLINE_ Shape2DSW *get_shape(int p_index) const { CRASH_BAD_INDEX(p_index, shapes.size()); return shapes[p_index].shape; -- cgit v1.2.3