fix undeclared variable 'boneworld'

master
Juraj Vajda 2017-12-11 00:43:21 -05:00
parent 8b67ba2424
commit bd9a224269
1 changed files with 2 additions and 2 deletions

View File

@ -241,12 +241,11 @@ end
minetest.register_globalstep(function(dtime)
cheat.scan_timer = cheat.scan_timer + dtime
local boneworld = false;
-- GENERAL SCAN OF ALL PLAYERS
if cheat.scan_timer>cheat.timestep then
cheat.stat_timer = cheat.stat_timer + cheat.timestep;
-- dig xp stats every 2 minutes
if boneworld and cheat.stat_timer>120 then
@ -376,6 +375,7 @@ minetest.register_on_joinplayer(function(player) -- init stuff on player join
minetest.after(5, -- load digxp after boneworld loads it
function()
local boneworld = false;
if boneworld and boneworld.xp then
cheat.players[name].stats.digxp = boneworld.digxp[name] or 0;
cheat.players[name].stats.state = 1;