mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 04:21:07 +01:00
Merge pull request 'Fix dispenser and dropper crash (in 5.4)' (#2544) from fix_dropper_dispenser_crash into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2544
This commit is contained in:
commit
8ff938c3d0
2 changed files with 3 additions and 3 deletions
|
@ -261,7 +261,7 @@ local dispenserdef = {
|
||||||
local item_entity = minetest.add_item(droppos, dropitem)
|
local item_entity = minetest.add_item(droppos, dropitem)
|
||||||
local drop_vel = vector.subtract(droppos, pos)
|
local drop_vel = vector.subtract(droppos, pos)
|
||||||
local speed = 3
|
local speed = 3
|
||||||
item_entity:set_velocity(drop_vel * speed)
|
item_entity:set_velocity(vector.multiply(drop_vel,speed))
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
stack:take_item()
|
stack:take_item()
|
||||||
|
@ -278,7 +278,7 @@ local dispenserdef = {
|
||||||
local item_entity = minetest.add_item(droppos, dropitem)
|
local item_entity = minetest.add_item(droppos, dropitem)
|
||||||
local drop_vel = vector.subtract(droppos, pos)
|
local drop_vel = vector.subtract(droppos, pos)
|
||||||
local speed = 3
|
local speed = 3
|
||||||
item_entity:set_velocity(drop_vel * speed)
|
item_entity:set_velocity(vector.multiply(drop_vel,speed))
|
||||||
stack:take_item()
|
stack:take_item()
|
||||||
inv:set_stack("main", stack_id, stack)
|
inv:set_stack("main", stack_id, stack)
|
||||||
end
|
end
|
||||||
|
|
|
@ -143,7 +143,7 @@ local dropperdef = {
|
||||||
local item_entity = minetest.add_item(droppos, dropitem)
|
local item_entity = minetest.add_item(droppos, dropitem)
|
||||||
local drop_vel = vector.subtract(droppos, pos)
|
local drop_vel = vector.subtract(droppos, pos)
|
||||||
local speed = 3
|
local speed = 3
|
||||||
item_entity:set_velocity(drop_vel * speed)
|
item_entity:set_velocity(vector.multiply(drop_vel,speed))
|
||||||
stack:take_item()
|
stack:take_item()
|
||||||
inv:set_stack("main", stack_id, stack)
|
inv:set_stack("main", stack_id, stack)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue