summaryrefslogtreecommitdiff
path: root/servers/physics_2d
diff options
context:
space:
mode:
Diffstat (limited to 'servers/physics_2d')
-rw-r--r--servers/physics_2d/collision_object_2d_sw.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/servers/physics_2d/collision_object_2d_sw.h b/servers/physics_2d/collision_object_2d_sw.h
index c3b9e4b713..f2b2363499 100644
--- a/servers/physics_2d/collision_object_2d_sw.h
+++ b/servers/physics_2d/collision_object_2d_sw.h
@@ -112,23 +112,23 @@ public:
_FORCE_INLINE_ int get_shape_count() const { return shapes.size(); }
_FORCE_INLINE_ Shape2DSW *get_shape(int p_index) const {
- ERR_FAIL_INDEX_V(p_index, shapes.size(), NULL);
+ CRASH_BAD_INDEX(p_index, shapes.size());
return shapes[p_index].shape;
}
_FORCE_INLINE_ const Transform2D &get_shape_transform(int p_index) const {
- ERR_FAIL_INDEX_V(p_index, shapes.size(), Transform2D());
+ CRASH_BAD_INDEX(p_index, shapes.size());
return shapes[p_index].xform;
}
_FORCE_INLINE_ const Transform2D &get_shape_inv_transform(int p_index) const {
- ERR_FAIL_INDEX_V(p_index, shapes.size(), Transform2D());
+ CRASH_BAD_INDEX(p_index, shapes.size());
return shapes[p_index].xform_inv;
}
_FORCE_INLINE_ const Rect2 &get_shape_aabb(int p_index) const {
- ERR_FAIL_INDEX_V(p_index, shapes.size(), Rect2());
+ CRASH_BAD_INDEX(p_index, shapes.size());
return shapes[p_index].aabb_cache;
}
_FORCE_INLINE_ const Variant &get_shape_metadata(int p_index) const {
- ERR_FAIL_INDEX_V(p_index, shapes.size(), Variant());
+ CRASH_BAD_INDEX(p_index, shapes.size());
return shapes[p_index].metadata;
}
@@ -138,16 +138,16 @@ public:
void set_shape_as_disabled(int p_idx, bool p_disabled);
_FORCE_INLINE_ bool is_shape_set_as_disabled(int p_idx) const {
- ERR_FAIL_INDEX_V(p_idx, shapes.size(), false);
+ CRASH_BAD_INDEX(p_idx, shapes.size());
return shapes[p_idx].disabled;
}
_FORCE_INLINE_ void set_shape_as_one_way_collision(int p_idx, bool p_one_way_collision) {
- ERR_FAIL_INDEX(p_idx, shapes.size());
+ CRASH_BAD_INDEX(p_idx, shapes.size());
shapes.write[p_idx].one_way_collision = p_one_way_collision;
}
_FORCE_INLINE_ bool is_shape_set_as_one_way_collision(int p_idx) const {
- ERR_FAIL_INDEX_V(p_idx, shapes.size(), false);
+ CRASH_BAD_INDEX(p_idx, shapes.size());
return shapes[p_idx].one_way_collision;
}