summaryrefslogtreecommitdiff
path: root/servers/physics_2d/collision_object_2d_sw.h
diff options
context:
space:
mode:
authorStanislav <stas.ponkrashov@gmail.com>2018-12-08 00:09:39 +0300
committerStanislav <stas.ponkrashov@gmail.com>2018-12-12 17:48:35 +0300
commit9edf98e8419ce68085a308ba4ae65fe8bf8a9f17 (patch)
tree971ee602c52ac0935a2752bd8545c2fd6db69734 /servers/physics_2d/collision_object_2d_sw.h
parent0611b674c19f2eb9cc6baaee25cf7c8146c643fb (diff)
Disabled CollisionShape and CollisionShape2D are not processed now
Fixes #24183
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;