fix server crash
This commit is contained in:
parent
416126f80c
commit
f9a582af5e
@ -751,11 +751,14 @@ function flylib.reset_move(pos)
|
|||||||
local nvm = techage.get_nvm(pos)
|
local nvm = techage.get_nvm(pos)
|
||||||
local height = techage.in_range(meta:contains("height") and meta:get_float("height") or 1, 0, 1)
|
local height = techage.in_range(meta:contains("height") and meta:get_float("height") or 1, 0, 1)
|
||||||
local max_speed = meta:contains("max_speed") and meta:get_int("max_speed") or MAX_SPEED
|
local max_speed = meta:contains("max_speed") and meta:get_int("max_speed") or MAX_SPEED
|
||||||
local move = vector.subtract(nvm.lpos1[1], (nvm.lastpos or nvm.lpos1)[1])
|
if nvm.lpos1 and nvm.lpos1[1] then
|
||||||
local resp
|
local move = vector.subtract(nvm.lpos1[1], (nvm.lastpos or nvm.lpos1)[1])
|
||||||
|
local resp
|
||||||
|
|
||||||
resp, nvm.lastpos = move_nodes2(pos, meta, nvm.lastpos or nvm.lpos1, move, max_speed, height)
|
resp, nvm.lastpos = move_nodes2(pos, meta, nvm.lastpos or nvm.lpos1, move, max_speed, height)
|
||||||
return resp
|
return resp
|
||||||
|
end
|
||||||
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
-- rot is one of "l", "r", "2l", "2r"
|
-- rot is one of "l", "r", "2l", "2r"
|
||||||
|
Loading…
Reference in New Issue
Block a user