timer_properties_update renamed to timer_stats_update

master
aa6 2016-04-30 13:46:29 +03:00
parent 0ed21811a3
commit acc8c3bac8
3 changed files with 9 additions and 9 deletions

View File

@ -1 +1 @@
0.2.8
0.2.9

View File

@ -101,21 +101,21 @@ if minetest_wadsprint.register_hudbar ~= nil then
minetest_wadsprint.register_hudbar()
end
-- Main cycle.
local timer_stats_update = 0
local timer_controls_check = 0
local timer_properties_update = 0
minetest.register_globalstep(function(dtime)
timer_stats_update = timer_stats_update + dtime
timer_controls_check = timer_controls_check + dtime
timer_properties_update = timer_properties_update + dtime
if timer_stats_update > minetest_wadsprint.PLAYER_STATS_UPDATE_PERIOD_SECONDS then
timer_stats_update = 0
for player_name,player in pairs(minetest_wadsprint.players) do
minetest_wadsprint.stamina_update_cycle(player)
end
end
if timer_controls_check > minetest_wadsprint.PLAYER_CONTROLS_CHECK_PERIOD_SECONDS then
timer_controls_check = 0
for player_name,player in pairs(minetest_wadsprint.players) do
minetest_wadsprint.scan_player_controls(player)
end
end
if timer_properties_update > minetest_wadsprint.PLAYER_STATS_UPDATE_PERIOD_SECONDS then
timer_properties_update = 0
for player_name,player in pairs(minetest_wadsprint.players) do
minetest_wadsprint.stamina_update_cycle(player)
end
end
end)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB