Skip to content

Commit 4275751

Browse files
committed
fix: add 2 seconds of threshold for reset fixed update
1 parent 64e8793 commit 4275751

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if (FREYR_PROFILING)
2727
add_subdirectory(vendor/perfetto)
2828
endif (FREYR_PROFILING)
2929

30-
project(freyr LANGUAGES C CXX VERSION 0.19.8)
30+
project(freyr LANGUAGES C CXX VERSION 0.19.9)
3131

3232
if (FREYR_BUILD_EXAMPLES)
3333
add_subdirectory(examples)

src/Core/Scene.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ namespace FREYR_NAMESPACE
109109

110110
mFixedDeltaTimeAccumulator += dt;
111111

112+
if (mFixedDeltaTimeAccumulator >= 2.0f)
113+
{
114+
mFixedDeltaTimeAccumulator = mOptions->FixedDeltaTime;
115+
}
116+
112117
while (mFixedDeltaTimeAccumulator >= mOptions->FixedDeltaTime)
113118
{
114119
mFixedDeltaTimeAccumulator = mFixedDeltaTimeAccumulator - mOptions->FixedDeltaTime;

0 commit comments

Comments
 (0)