summaryrefslogtreecommitdiffstats
path: root/main/main.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-07-07 21:58:55 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-07-07 21:58:55 +0200
commit307b4e30919ae9762ed12fafbe9b04c90bd105ab (patch)
tree4e21fa8f0b7ff8ab9f5818dad3af6983d6454a7e /main/main.cpp
parentaec5c85acb7e052c64588b708c8ee6d22b3a6489 (diff)
parent23521635d2f68525a6e41dde17bf34a53225e3e1 (diff)
downloadredot-engine-307b4e30919ae9762ed12fafbe9b04c90bd105ab.tar.gz
Merge pull request #94039 from rburing/fix_physics_tickcounter
Fix physics tick counter
Diffstat (limited to 'main/main.cpp')
-rw-r--r--main/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp
index e6be23034d..060b3fe2f6 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -4043,6 +4043,7 @@ bool Main::iteration() {
}
Engine::get_singleton()->_in_physics = true;
+ Engine::get_singleton()->_physics_frames++;
uint64_t physics_begin = OS::get_singleton()->get_ticks_usec();
@@ -4090,7 +4091,6 @@ bool Main::iteration() {
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);
- Engine::get_singleton()->_physics_frames++;
Engine::get_singleton()->_in_physics = false;
}