diff --git a/res/content/base/scripts/hud.lua b/res/content/base/scripts/hud.lua index 00f6bdc6..9fc10f2a 100644 --- a/res/content/base/scripts/hud.lua +++ b/res/content/base/scripts/hud.lua @@ -21,6 +21,9 @@ function on_hud_open() local ppos = vec3.add({player.get_pos(pid)}, {0, 0.7, 0}) local throw_force = vec3.mul(player.get_dir(pid), DROP_FORCE) local drop = base_util.drop(ppos, itemid, 1, data, 1.5) + if not drop then + return + end local velocity = vec3.add(throw_force, vec3.add(pvel, DROP_INIT_VEL)) drop.rigidbody:set_vel(velocity) end) diff --git a/res/project_client.lua b/res/project_client.lua index ede54110..a1952c08 100644 --- a/res/project_client.lua +++ b/res/project_client.lua @@ -20,7 +20,7 @@ function on_menu_setup() gui.root.root:add( "", controller) - menubg = _GUI_ROOT.menubg + menubg = gui.root.menubg controller.resize_menu_bg() menu.page = "main" end