mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-01-09 00:29:33 +01:00
Merge pull request 'Hotfix: Fix snowmen throwing snowballs and fix mcl_throwing when player throws things' (#4755) from fix-snowman into master
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4755 Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
This commit is contained in:
commit
eab4c7b831
1 changed files with 2 additions and 2 deletions
|
@ -25,7 +25,7 @@ function mcl_throwing.throw(throw_item, pos, dir, velocity, thrower)
|
||||||
local itemstring = ItemStack(throw_item):get_name()
|
local itemstring = ItemStack(throw_item):get_name()
|
||||||
local obj = vl_projectile.create(entity_mapping[itemstring], {
|
local obj = vl_projectile.create(entity_mapping[itemstring], {
|
||||||
pos = pos,
|
pos = pos,
|
||||||
owner_id = thrower,
|
owner = thrower,
|
||||||
dir = dir,
|
dir = dir,
|
||||||
velocity = velocity,
|
velocity = velocity,
|
||||||
drag = 3,
|
drag = 3,
|
||||||
|
@ -39,7 +39,7 @@ function mcl_throwing.get_player_throw_function(entity_name, velocity)
|
||||||
local function func(item, player, pointed_thing)
|
local function func(item, player, pointed_thing)
|
||||||
local playerpos = player:get_pos()
|
local playerpos = player:get_pos()
|
||||||
local dir = player:get_look_dir()
|
local dir = player:get_look_dir()
|
||||||
mcl_throwing.throw(item, {x=playerpos.x, y=playerpos.y+1.5, z=playerpos.z}, dir, velocity, player:get_player_name())
|
mcl_throwing.throw(item, {x=playerpos.x, y=playerpos.y+1.5, z=playerpos.z}, dir, velocity, player)
|
||||||
if not minetest.is_creative_enabled(player:get_player_name()) then
|
if not minetest.is_creative_enabled(player:get_player_name()) then
|
||||||
item:take_item()
|
item:take_item()
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue