summaryrefslogtreecommitdiff
path: root/servers/physics_2d/step_2d_sw.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'servers/physics_2d/step_2d_sw.cpp')
-rw-r--r--servers/physics_2d/step_2d_sw.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/servers/physics_2d/step_2d_sw.cpp b/servers/physics_2d/step_2d_sw.cpp
index 21f18229e7..6f3bcfec13 100644
--- a/servers/physics_2d/step_2d_sw.cpp
+++ b/servers/physics_2d/step_2d_sw.cpp
@@ -50,7 +50,7 @@ void Step2DSW::_populate_island(Body2DSW *p_body, Body2DSW **p_island, Constrain
if (i == E->get())
continue;
Body2DSW *b = c->get_body_ptr()[i];
- if (b->get_island_step() == _step || b->get_mode() == Physics2DServer::BODY_MODE_STATIC || b->get_mode() == Physics2DServer::BODY_MODE_KINEMATIC)
+ if (b->get_island_step() == _step || b->get_mode() == PhysicsServer2D::BODY_MODE_STATIC || b->get_mode() == PhysicsServer2D::BODY_MODE_KINEMATIC)
continue; //no go
_populate_island(c->get_body_ptr()[i], p_island, p_constraint_island);
}
@@ -60,7 +60,7 @@ void Step2DSW::_populate_island(Body2DSW *p_body, Body2DSW **p_island, Constrain
bool Step2DSW::_setup_island(Constraint2DSW *p_island, real_t p_delta) {
Constraint2DSW *ci = p_island;
- Constraint2DSW *prev_ci = NULL;
+ Constraint2DSW *prev_ci = nullptr;
bool removed_root = false;
while (ci) {
bool process = ci->setup(p_delta);
@@ -101,7 +101,7 @@ void Step2DSW::_check_suspend(Body2DSW *p_island, real_t p_delta) {
Body2DSW *b = p_island;
while (b) {
- if (b->get_mode() == Physics2DServer::BODY_MODE_STATIC || b->get_mode() == Physics2DServer::BODY_MODE_KINEMATIC) {
+ if (b->get_mode() == PhysicsServer2D::BODY_MODE_STATIC || b->get_mode() == PhysicsServer2D::BODY_MODE_KINEMATIC) {
b = b->get_island_next();
continue; //ignore for static
}
@@ -117,7 +117,7 @@ void Step2DSW::_check_suspend(Body2DSW *p_island, real_t p_delta) {
b = p_island;
while (b) {
- if (b->get_mode() == Physics2DServer::BODY_MODE_STATIC || b->get_mode() == Physics2DServer::BODY_MODE_KINEMATIC) {
+ if (b->get_mode() == PhysicsServer2D::BODY_MODE_STATIC || b->get_mode() == PhysicsServer2D::BODY_MODE_KINEMATIC) {
b = b->get_island_next();
continue; //ignore for static
}
@@ -164,8 +164,8 @@ void Step2DSW::step(Space2DSW *p_space, real_t p_delta, int p_iterations) {
/* GENERATE CONSTRAINT ISLANDS */
- Body2DSW *island_list = NULL;
- Constraint2DSW *constraint_island_list = NULL;
+ Body2DSW *island_list = nullptr;
+ Constraint2DSW *constraint_island_list = nullptr;
b = body_list->first();
int island_count = 0;
@@ -175,8 +175,8 @@ void Step2DSW::step(Space2DSW *p_space, real_t p_delta, int p_iterations) {
if (body->get_island_step() != _step) {
- Body2DSW *island = NULL;
- Constraint2DSW *constraint_island = NULL;
+ Body2DSW *island = nullptr;
+ Constraint2DSW *constraint_island = nullptr;
_populate_island(body, &island, &constraint_island);
island->set_island_list_next(island_list);
@@ -202,7 +202,7 @@ void Step2DSW::step(Space2DSW *p_space, real_t p_delta, int p_iterations) {
if (c->get_island_step() == _step)
continue;
c->set_island_step(_step);
- c->set_island_next(NULL);
+ c->set_island_next(nullptr);
c->set_island_list_next(constraint_island_list);
constraint_island_list = c;
}
@@ -219,7 +219,7 @@ void Step2DSW::step(Space2DSW *p_space, real_t p_delta, int p_iterations) {
{
Constraint2DSW *ci = constraint_island_list;
- Constraint2DSW *prev_ci = NULL;
+ Constraint2DSW *prev_ci = nullptr;
while (ci) {
if (_setup_island(ci, p_delta)) {