summaryrefslogtreecommitdiff
path: root/servers/physics_2d/collision_object_2d_sw.h
diff options
context:
space:
mode:
Diffstat (limited to 'servers/physics_2d/collision_object_2d_sw.h')
-rw-r--r--servers/physics_2d/collision_object_2d_sw.h4
1 files changed, 4 insertions, 0 deletions
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;