mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-05 01:03:44 +01:00
Allow mob projectiles to hit their owner after 2 seconds (used by ghast fireball)
This commit is contained in:
parent
75300bf4bb
commit
801eeec7c4
@ -383,7 +383,6 @@ end
|
||||
|
||||
-- register arrow for shoot attack
|
||||
function mcl_mobs.register_arrow(name, def)
|
||||
|
||||
if not name or not def then return end -- errorcheck
|
||||
|
||||
local behaviors = {}
|
||||
@ -417,6 +416,7 @@ function mcl_mobs.register_arrow(name, def)
|
||||
ignore_gravity = true,
|
||||
damages_players = true,
|
||||
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
|
||||
return true
|
||||
end,
|
||||
|
Loading…
Reference in New Issue
Block a user