Cap maximum deltaTime in LegoNavController (#749)

This commit is contained in:
Christian Semmler 2025-12-25 07:29:29 -07:00 committed by GitHub
parent e95f7795c1
commit 6531ac4083
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -341,7 +341,7 @@ MxBool LegoNavController::CalculateNewPosDir(
MxBool und = FALSE;
MxTime currentTime = Timer()->GetTime();
float deltaTime = (currentTime - m_lastTime) / 1000.0;
float deltaTime = Min((currentTime - m_lastTime) / 1000.0, 1. / 10.);
m_lastTime = currentTime;
if (ProcessKeyboardInput() == FAILURE) {