mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 21:41:50 +00:00
cleanup
This commit is contained in:
parent
b5f1698e78
commit
d32407f1bb
2 changed files with 4 additions and 1 deletions
|
|
@ -21,6 +21,9 @@ function on_hud_open()
|
||||||
local ppos = vec3.add({player.get_pos(pid)}, {0, 0.7, 0})
|
local ppos = vec3.add({player.get_pos(pid)}, {0, 0.7, 0})
|
||||||
local throw_force = vec3.mul(player.get_dir(pid), DROP_FORCE)
|
local throw_force = vec3.mul(player.get_dir(pid), DROP_FORCE)
|
||||||
local drop = base_util.drop(ppos, itemid, 1, data, 1.5)
|
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))
|
local velocity = vec3.add(throw_force, vec3.add(pvel, DROP_INIT_VEL))
|
||||||
drop.rigidbody:set_vel(velocity)
|
drop.rigidbody:set_vel(velocity)
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ function on_menu_setup()
|
||||||
gui.root.root:add(
|
gui.root.root:add(
|
||||||
"<image id='menubg' src='gui/menubg' size-func='DATA.resize_menu_bg' "..
|
"<image id='menubg' src='gui/menubg' size-func='DATA.resize_menu_bg' "..
|
||||||
"z-index='-1' interactive='true'/>", controller)
|
"z-index='-1' interactive='true'/>", controller)
|
||||||
menubg = _GUI_ROOT.menubg
|
menubg = gui.root.menubg
|
||||||
controller.resize_menu_bg()
|
controller.resize_menu_bg()
|
||||||
menu.page = "main"
|
menu.page = "main"
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue