mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-01 07:13:45 +01:00
Fix possible crash in mcl_item_entity
This commit is contained in:
parent
d1ab9e4f86
commit
07d237ce15
@ -233,7 +233,7 @@ core.register_entity(":__builtin:item", {
|
|||||||
if item_drop_settings.random_item_velocity == true then
|
if item_drop_settings.random_item_velocity == true then
|
||||||
minetest.after(0, function()
|
minetest.after(0, function()
|
||||||
local vel = self.object:getvelocity()
|
local vel = self.object:getvelocity()
|
||||||
if vel.x == 0 and vel.z == 0 then
|
if vel and vel.x == 0 and vel.z == 0 then
|
||||||
local x = math.random(1, 5)
|
local x = math.random(1, 5)
|
||||||
if math.random(1,2) == 1 then
|
if math.random(1,2) == 1 then
|
||||||
x = -x
|
x = -x
|
||||||
|
Loading…
Reference in New Issue
Block a user