mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Clean up getTime helpers
This increases size of the getTime return values to 64 bits. It also removes the TimeGetter classes since the getTime functions are now very precise.
This commit is contained in:
parent
7f4cdbcbe9
commit
b662a4577d
22 changed files with 116 additions and 216 deletions
|
@ -619,7 +619,7 @@ void Hud::resizeHotbar() {
|
|||
}
|
||||
|
||||
struct MeshTimeInfo {
|
||||
s32 time;
|
||||
s64 time;
|
||||
scene::IMesh *mesh;
|
||||
};
|
||||
|
||||
|
@ -653,9 +653,9 @@ void drawItemStack(video::IVideoDriver *driver,
|
|||
MeshTimeInfo &ti = rotation_time_infos[rotation_kind];
|
||||
if (mesh != ti.mesh) {
|
||||
ti.mesh = mesh;
|
||||
ti.time = getTimeMs();
|
||||
ti.time = porting::getTimeMs();
|
||||
} else {
|
||||
delta = porting::getDeltaMs(ti.time, getTimeMs()) % 100000;
|
||||
delta = porting::getDeltaMs(ti.time, porting::getTimeMs()) % 100000;
|
||||
}
|
||||
}
|
||||
core::rect<s32> oldViewPort = driver->getViewPort();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue