aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2019-05-12 22:38:50 +0200
committerorwell96 <orwell@bleipb.de>2019-05-12 22:38:50 +0200
commit57175b5532a37577cd1bfc590dbaeab2d5b9fabe (patch)
tree5e86ca3527f8a7be8c67d5cbc50f1311c6609dd1
parente8e828d9c7ab9ffc7ef1d19c88355b71359cedf7 (diff)
downloadposhud-57175b5532a37577cd1bfc590dbaeab2d5b9fabe.zip
poshud-57175b5532a37577cd1bfc590dbaeab2d5b9fabe.tar.gz
poshud-57175b5532a37577cd1bfc590dbaeab2d5b9fabe.tar.bz2
Add current lag and enable by default
-rw-r--r--init.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/init.lua b/init.lua
index 6be6c5a..9be0b2e 100644
--- a/init.lua
+++ b/init.lua
@@ -56,7 +56,7 @@ end
local function updatehud(player, text)
local name = player:get_player_name()
- if not player_hud_enabled[name] then
+ if player_hud_enabled[name]==false then
-- check if the player enabled the hud
return
end
@@ -187,7 +187,7 @@ minetest.register_globalstep(function (dtime)
if h_tmr <= 0 then
local l_avg = l_sumsq / l_sum
-- Update hud text that is the same for all players
- local s_lag = string.format("Lag: avg: %.2f peak: %.2f", l_avg, l_max)
+ local s_lag = string.format("Lag: %.2f avg: %.2f peak: %.2f", news, l_avg, l_max)
local s_time = "Time: "..get_time()
local s_star = ""