diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-10-21 16:48:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-21 16:48:05 +0200 |
commit | 632459a46bcb321560152932bd401f750f98be1a (patch) | |
tree | 693fdc57c9302f2fb1d2b75dfc55006b07b0ce1a /main | |
parent | 2e212a2cfd8bba3fd484cda03cfcad44edd78fb8 (diff) | |
parent | 9b634180aa9eefe079ecbf0ae1a1227d9555ba02 (diff) |
Merge pull request #12281 from Noshyaar/fixed2physics
Refactor Fixed to Physics
Diffstat (limited to 'main')
-rw-r--r-- | main/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/main/main.cpp b/main/main.cpp index 04ed902c28..deffb3a632 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1633,7 +1633,7 @@ bool Main::iteration() { while (time_accum > frame_slice) { - uint64_t fixed_begin = OS::get_singleton()->get_ticks_usec(); + uint64_t physics_begin = OS::get_singleton()->get_ticks_usec(); PhysicsServer::get_singleton()->sync(); PhysicsServer::get_singleton()->flush_queries(); @@ -1656,8 +1656,8 @@ bool Main::iteration() { time_accum -= frame_slice; message_queue->flush(); - physics_process_ticks = MAX(physics_process_ticks, OS::get_singleton()->get_ticks_usec() - fixed_begin); // keep the largest one for reference - physics_process_max = MAX(OS::get_singleton()->get_ticks_usec() - fixed_begin, physics_process_max); + physics_process_ticks = MAX(physics_process_ticks, OS::get_singleton()->get_ticks_usec() - physics_begin); // keep the largest one for reference + physics_process_max = MAX(OS::get_singleton()->get_ticks_usec() - physics_begin, physics_process_max); iters++; Engine::get_singleton()->_physics_frames++; } |