mirror of
https://github.com/celisej567/mcpe.git
synced 2026-01-05 18:10:09 +03:00
migrate ALMOST everything from source tree into client
This commit is contained in:
22
source/client/player/input/ITurnInput.cpp
Normal file
22
source/client/player/input/ITurnInput.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
/********************************************************************
|
||||
Minecraft: Pocket Edition - Decompilation Project
|
||||
Copyright (C) 2023 iProgramInCpp
|
||||
|
||||
The following code is licensed under the BSD 1 clause license.
|
||||
SPDX-License-Identifier: BSD-1-Clause
|
||||
********************************************************************/
|
||||
|
||||
#include "ITurnInput.hpp"
|
||||
#include "Utils.hpp"
|
||||
|
||||
float ITurnInput::getDeltaTime()
|
||||
{
|
||||
if (m_prevTime == -1.0f)
|
||||
m_prevTime = getTimeS();
|
||||
|
||||
float newTime = getTimeS();
|
||||
float delta = newTime - m_prevTime;
|
||||
m_prevTime = newTime;
|
||||
|
||||
return delta;
|
||||
}
|
||||
Reference in New Issue
Block a user