Fix crash in autofly mod
From clean `~/.minetest` directory: - Start waspsaliva - Create a waypoint ".wah" - Cheat menu -> autofly -> waypoints - Click the new waypoint - Click SHOW button 2021-08-19 22:24:46: ERROR[Main]: ModError: Runtime error from mod 'autoeat' in callback on_formspec_input(): *builtin*:common/vector.lua:67: attempt to index local 'pos2' (a nil value) 2021-08-19 22:24:46: ERROR[Main]: stack traceback: 2021-08-19 22:24:46: ERROR[Main]: *builtin*:common/vector.lua:67: in function 'direction' 2021-08-19 22:24:46: ERROR[Main]: *builtin*:client/wasplib.lua:503: in function 'aim' 2021-08-19 22:24:46: ERROR[Main]: autofly:init.lua:301: in function 'display_waypoint' 2021-08-19 22:24:46: ERROR[Main]: autofly:/wpforms.lua:102: in function <autofly:/wpforms.lua:77> 2021-08-19 22:24:46: ERROR[Main]: *builtin*:client/register.lua:26: in function <*builtin*:client/register.lua:14> 2021-08-19 22:24:46: ERROR[Main]: Check debug.txt for details.
This commit is contained in:
parent
f7c543bc1b
commit
1c1eac07f3
@ -296,7 +296,7 @@ function autofly.display_waypoint(name)
|
|||||||
local pos=name
|
local pos=name
|
||||||
if type(name) ~= 'table' then pos=autofly.get_waypoint(name) end
|
if type(name) ~= 'table' then pos=autofly.get_waypoint(name) end
|
||||||
autofly.last_name = name
|
autofly.last_name = name
|
||||||
--autofly.last_coords = pos
|
autofly.last_coords = pos
|
||||||
autofly.set_hud_info(name)
|
autofly.set_hud_info(name)
|
||||||
autofly.aim(autofly.last_coords)
|
autofly.aim(autofly.last_coords)
|
||||||
autofly.display(pos,name)
|
autofly.display(pos,name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user