Skip to content

Commit

Permalink
Merge pull request #54925 from nekomatata/bvh-fix-update-3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored Nov 16, 2021
2 parents c3a6b0f + e9fdf3e commit 4508878
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion servers/physics/step_sw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ void StepSW::step(SpaceSW *p_space, real_t p_delta, int p_iterations) {

p_space->set_active_objects(active_count);

// Update the broadphase to register collision pairs.
p_space->update();

{ //profile
profile_endtime = OS::get_singleton()->get_ticks_usec();
p_space->set_elapsed_time(SpaceSW::ELAPSED_TIME_INTEGRATE_FORCES, profile_endtime - profile_begtime);
Expand Down Expand Up @@ -278,7 +281,6 @@ void StepSW::step(SpaceSW *p_space, real_t p_delta, int p_iterations) {
profile_begtime = profile_endtime;
}

p_space->update();
p_space->unlock();
_step++;
}
Expand Down
4 changes: 3 additions & 1 deletion servers/physics_2d/step_2d_sw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ void Step2DSW::step(Space2DSW *p_space, real_t p_delta, int p_iterations) {

p_space->set_active_objects(active_count);

// Update the broadphase to register collision pairs.
p_space->update();

{ //profile
profile_endtime = OS::get_singleton()->get_ticks_usec();
p_space->set_elapsed_time(Space2DSW::ELAPSED_TIME_INTEGRATE_FORCES, profile_endtime - profile_begtime);
Expand Down Expand Up @@ -294,7 +297,6 @@ void Step2DSW::step(Space2DSW *p_space, real_t p_delta, int p_iterations) {
//profile_begtime=profile_endtime;
}

p_space->update();
p_space->unlock();
_step++;
}
Expand Down

0 comments on commit 4508878

Please sign in to comment.