mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-08-18 21:14:11 +02:00
Fix crash when creeper explodes in minecart
This commit is contained in:
parent
5507e99582
commit
be8d9122ee
@ -5,7 +5,12 @@ function mcl_burning.get_storage(obj)
|
||||
end
|
||||
|
||||
function mcl_burning.is_burning(obj)
|
||||
return mcl_burning.get_storage(obj).burn_time
|
||||
local storage = mcl_burning.get_storage(obj)
|
||||
if storage then
|
||||
return mcl_burning.get_storage(obj).burn_time
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
function mcl_burning.is_affected_by_rain(obj)
|
||||
|
@ -370,13 +370,10 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
|
||||
end
|
||||
end
|
||||
end
|
||||
-- Make room in the minecart after the mob dies
|
||||
elseif self._passenger then
|
||||
if math.random(1,20) == 1 then
|
||||
local dead = self._passenger:check_for_death()
|
||||
if dead == true then
|
||||
self._passenger = nil
|
||||
end
|
||||
local passenger_pos = self._passenger.object:get_pos()
|
||||
if not passenger_pos then
|
||||
self._passenger = nil
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user