consider 'time_speed' change at runtine

This commit is contained in:
kay27 2020-07-27 07:58:20 +00:00
parent f1c01e2785
commit 252c7c501e
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,5 @@
local S = minetest.get_translator("mcl_furnaces")
local time_multiplier = 24*60*60 / (minetest.settings:get('time_speed') or 72)
--
-- Formspecs
@ -164,6 +163,7 @@ local function furnace_node_timer(pos, elapsed)
local src_item = meta:get_string("src_item") or ""
local fuel_totaltime = meta:get_float("fuel_totaltime") or 0
local time_multiplier = 86400 / (minetest.settings:get('time_speed') or 72)
local current_game_time = .0 + ((minetest.get_day_count() + minetest.get_timeofday()) * time_multiplier)
local last_game_time = meta:get_string("last_gametime") -- FIXME: In Windows s(g)et_float() works OK but under Linux it returns rounded 2-byte values like 449540.000000000 which are unusable