mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-16 16:11:06 +01:00
[5.6][bows] fix unsafe entity handling for arrows
This commit is contained in:
parent
4f2789c498
commit
156aff21a1
2 changed files with 4 additions and 2 deletions
|
@ -114,8 +114,9 @@ local function damage_particles(pos, is_critical)
|
|||
end
|
||||
|
||||
function ARROW_ENTITY.on_step(self, dtime)
|
||||
-- ERROR: [#2523] THIS WILL CAUSE INVALID OBJECTREFS
|
||||
mcl_burning.tick(self.object, dtime, self)
|
||||
-- mcl_burning.tick may remove object immediately
|
||||
if not self.object:get_pos() then return end
|
||||
|
||||
self._time_in_air = self._time_in_air + .001
|
||||
|
||||
|
|
|
@ -312,8 +312,9 @@ local function damage_particles(pos, is_critical)
|
|||
end
|
||||
|
||||
function ARROW_ENTITY.on_step(self, dtime)
|
||||
-- ERROR: [#2523] THIS WILL CAUSE INVALID OBJECTREFS
|
||||
mcl_burning.tick(self.object, dtime, self)
|
||||
-- mcl_burning.tick may remove object immediately
|
||||
if not self.object:get_pos() then return end
|
||||
|
||||
self._time_in_air = self._time_in_air + .001
|
||||
|
||||
|
|
Loading…
Reference in a new issue