Skip to content

Commit 3e3cfa3

Browse files
committed
It looks like there are more problems with trying to run faster than the tick rate,
so I restored the tick rate limitation but kept the improved fractional delta-time precision when smooth delta time is enabled.
1 parent 0d889df commit 3e3cfa3

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

TheForceEngine/TFE_Jedi/Task/task.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ namespace TFE_Jedi
530530

531531
JBool task_canRun()
532532
{
533-
bool timeLimiter = s_enableTimeLimiter && !TFE_Settings::getGraphicsSettings()->useSmoothDeltaTime;
533+
bool timeLimiter = s_enableTimeLimiter;
534534
if (s_taskCount && timeLimiter)
535535
{
536536
const f64 time = TFE_System::getTime();
@@ -560,16 +560,11 @@ namespace TFE_Jedi
560560
// Limit the update rate by the minimum interval.
561561
// Dark Forces uses discrete 'ticks' to track time and the game behavior is very odd with 0 tick frames.
562562
const f64 time = TFE_System::getTime();
563-
const bool timeLimiter = s_enableTimeLimiter && !TFE_Settings::getGraphicsSettings()->useSmoothDeltaTime && !TFE_Input::isReplaySystemLive();
563+
const bool timeLimiter = s_enableTimeLimiter && !TFE_Input::isReplaySystemLive();
564564
if (time - s_prevTime < s_minIntervalInSec && timeLimiter)
565565
{
566566
return JFALSE;
567567
}
568-
// Timing still breaks down if the frames are too short - even with fractional ticks.
569-
if (time - s_prevTime < 0.5f * s_minIntervalInSec)
570-
{
571-
return JFALSE;
572-
}
573568

574569
s_prevTime = time;
575570
s_currentMsg = MSG_RUN_TASK;

0 commit comments

Comments
 (0)