Chess: Don't crash on nil-player calling can_dig.

master
Tim 2016-08-05 21:03:22 +02:00
parent 9fbf904837
commit f8fee398db
1 changed files with 3 additions and 0 deletions

View File

@ -556,6 +556,9 @@ function realchess.fields(pos, _, fields, sender)
end
function realchess.dig(pos, player)
if not player then
return false
end
local meta = minetest.get_meta(pos)
local playerName = player:get_player_name()
local timeout_limit = meta:get_int("lastMoveTime") + 300