mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Reduce the use of porting::getTimeMs() when rendering frames (#12679)
* Avoid calling TimeTaker too frequently in renderMapXXX * Calculate animation timer once per frame * Remove code that breaks rendering frame at 2000ms Co-authored-by: sfan5 <sfan5@live.de> Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
@@ -34,6 +34,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "settings.h"
|
||||
#include "shader.h"
|
||||
#include "content_cao.h"
|
||||
#include "porting.h"
|
||||
#include <algorithm>
|
||||
#include "client/renderingengine.h"
|
||||
|
||||
@@ -513,3 +514,8 @@ void ClientEnvironment::getSelectedActiveObjects(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ClientEnvironment::updateFrameTime()
|
||||
{
|
||||
m_frame_time = porting::getTimeMs();
|
||||
}
|
||||
|
Reference in New Issue
Block a user