mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-01-10 00:59:35 +01:00
Allow mob projectiles to hit their owner after 2 seconds (used by ghast fireball)
This commit is contained in:
parent
f0a3f9fe18
commit
b23b16842c
1 changed files with 1 additions and 1 deletions
|
@ -380,7 +380,6 @@ end
|
||||||
|
|
||||||
-- register arrow for shoot attack
|
-- register arrow for shoot attack
|
||||||
function mcl_mobs.register_arrow(name, def)
|
function mcl_mobs.register_arrow(name, def)
|
||||||
|
|
||||||
if not name or not def then return end -- errorcheck
|
if not name or not def then return end -- errorcheck
|
||||||
|
|
||||||
local behaviors = {}
|
local behaviors = {}
|
||||||
|
@ -414,6 +413,7 @@ function mcl_mobs.register_arrow(name, def)
|
||||||
ignore_gravity = true,
|
ignore_gravity = true,
|
||||||
damages_players = true,
|
damages_players = true,
|
||||||
allow_punching = function(self, entity_def, projectile_def, object)
|
allow_punching = function(self, entity_def, projectile_def, object)
|
||||||
|
if self.timer > 2 then return true end
|
||||||
if self._owner and object == self._owner.object then return false end
|
if self._owner and object == self._owner.object then return false end
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in a new issue