diff options
author | ShadowNinja <shadowninja@minetest.net> | 2016-03-06 14:31:16 -0500 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2017-04-28 14:43:18 -0400 |
commit | b662a4577d692329b9ca83525e6039f2ddcd1ac1 (patch) | |
tree | d1f59d395f47320149560bef4278dc0e6a194473 /src/hud.cpp | |
parent | 7f4cdbcbe9b5b4655c2c5eba2043628487668e24 (diff) | |
download | minetest-b662a4577d692329b9ca83525e6039f2ddcd1ac1.tar.gz minetest-b662a4577d692329b9ca83525e6039f2ddcd1ac1.tar.bz2 minetest-b662a4577d692329b9ca83525e6039f2ddcd1ac1.zip |
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.
Diffstat (limited to 'src/hud.cpp')
-rw-r--r-- | src/hud.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hud.cpp b/src/hud.cpp index c482912e9..9729013ee 100644 --- a/src/hud.cpp +++ b/src/hud.cpp @@ -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(); |