mirror of
https://github.com/APercy/airutils.git
synced 2025-03-15 08:01:22 +00:00
fix ADS inicialization
This commit is contained in:
parent
e1e0330f1c
commit
21928c277c
1 changed files with 2 additions and 1 deletions
|
@ -222,8 +222,8 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
local name = player:get_player_name()
|
||||
local plane_obj = airutils.getPlaneFromPlayer(player)
|
||||
if plane_obj == nil then
|
||||
minetest.close_formspec(name, "lib_planes:adf_main")
|
||||
minetest.chat_send_player(name, core.colorize('#ff0000', " >>> There is something wrong with the plane..."))
|
||||
minetest.close_formspec(name, "lib_planes:adf_main")
|
||||
return
|
||||
end
|
||||
local ent = plane_obj:get_luaentity()
|
||||
|
@ -238,6 +238,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
end
|
||||
end
|
||||
if fields.save_adf then
|
||||
if not ent._adf_destiny then ent._adf_destiny = {x=0,z=0} end
|
||||
if ent._adf_destiny then
|
||||
if fields.adf_x and fields.adf_z then
|
||||
if tonumber(fields.adf_x, 10) ~= nil and tonumber(fields.adf_z, 10) ~= nil then
|
||||
|
|
Loading…
Add table
Reference in a new issue