mirror of
https://gitlab.com/4w/mtimer.git
synced 2024-11-28 02:03:46 +01:00
use math.floor for processing the ingame timestamp
fixes https://gitlab.com/4w/mtimer/-/issues/23
This commit is contained in:
parent
e9ddeff9d1
commit
7188f890c7
@ -193,7 +193,7 @@ end
|
|||||||
local get_ingame_time = function (player_name)
|
local get_ingame_time = function (player_name)
|
||||||
local player = minetest.get_player_by_name(player_name)
|
local player = minetest.get_player_by_name(player_name)
|
||||||
local format = player:get_meta():get_string(m.meta.ingame_time_format.key)
|
local format = player:get_meta():get_string(m.meta.ingame_time_format.key)
|
||||||
local time_of_day = tostring((minetest.get_timeofday() * 24000) * 3.6)
|
local time_of_day = math.floor((minetest.get_timeofday() * 24000) * 3.6)
|
||||||
local ingame_timestamp = tonumber(string.format('%.0f', time_of_day))
|
local ingame_timestamp = tonumber(string.format('%.0f', time_of_day))
|
||||||
|
|
||||||
local values = {
|
local values = {
|
||||||
|
Loading…
Reference in New Issue
Block a user