summaryrefslogtreecommitdiff
path: root/servers/physics_3d/collision_object_3d_sw.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'servers/physics_3d/collision_object_3d_sw.cpp')
-rw-r--r--servers/physics_3d/collision_object_3d_sw.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/servers/physics_3d/collision_object_3d_sw.cpp b/servers/physics_3d/collision_object_3d_sw.cpp
index 22a8235744..e12f0659e2 100644
--- a/servers/physics_3d/collision_object_3d_sw.cpp
+++ b/servers/physics_3d/collision_object_3d_sw.cpp
@@ -95,8 +95,9 @@ void CollisionObject3DSW::remove_shape(int p_index) {
//remove anything from shape to be erased to end, so subindices don't change
ERR_FAIL_INDEX(p_index, shapes.size());
for (int i = p_index; i < shapes.size(); i++) {
- if (shapes[i].bpid == 0)
+ if (shapes[i].bpid == 0) {
continue;
+ }
//should never get here with a null owner
space->get_broadphase()->remove(shapes[i].bpid);
shapes.write[i].bpid = 0;
@@ -112,12 +113,14 @@ void CollisionObject3DSW::remove_shape(int p_index) {
}
void CollisionObject3DSW::_set_static(bool p_static) {
- if (_static == p_static)
+ if (_static == p_static) {
return;
+ }
_static = p_static;
- if (!space)
+ if (!space) {
return;
+ }
for (int i = 0; i < get_shape_count(); i++) {
const Shape &s = shapes[i];
if (s.bpid > 0) {
@@ -137,8 +140,9 @@ void CollisionObject3DSW::_unregister_shapes() {
}
void CollisionObject3DSW::_update_shapes() {
- if (!space)
+ if (!space) {
return;
+ }
for (int i = 0; i < shapes.size(); i++) {
Shape &s = shapes.write[i];
@@ -162,8 +166,9 @@ void CollisionObject3DSW::_update_shapes() {
}
void CollisionObject3DSW::_update_shapes_with_motion(const Vector3 &p_motion) {
- if (!space)
+ if (!space) {
return;
+ }
for (int i = 0; i < shapes.size(); i++) {
Shape &s = shapes.write[i];