summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorPoommetee Ketson <poommetee@protonmail.com>2017-10-21 21:28:08 +0700
committerPoommetee Ketson <poommetee@protonmail.com>2017-10-21 21:28:08 +0700
commit9b634180aa9eefe079ecbf0ae1a1227d9555ba02 (patch)
tree08b15cd1d783f5734ddb24fb30b01e9084eb3dd3 /main
parentb302084395a6d7f3cc8e4102751ced29779f2ea2 (diff)
Refactor Fixed to Physics
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp6
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++;
}