Refactor Fixed to Physics
This commit is contained in:
@@ -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++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user