mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-11 12:13:15 +01:00
Lingering potions should not collide with liquids, change behaviors assersion loop to catch nil members
This commit is contained in:
parent
2a8abb4170
commit
4cb674e916
@ -211,7 +211,6 @@ function mcl_potions.register_lingering(name, descr, color, def)
|
||||
vl_projectile.collides_with_entities,
|
||||
vl_projectile.collides_with_solids,
|
||||
},
|
||||
collides_with = {"group:liquid"},
|
||||
on_collide_with_entity = on_collide,
|
||||
on_collide_with_solid = function(self, pos, node)
|
||||
if mod_target and n == "mcl_target:target_off" then
|
||||
|
@ -379,8 +379,9 @@ end
|
||||
|
||||
function mod.register(name, def)
|
||||
assert(def._vl_projectile)
|
||||
for _,behavior in pairs(def._vl_projectile.behaviors) do
|
||||
assert(behavior)
|
||||
local behaviors = def._vl_projectile.behaviors
|
||||
for i = 1,#behaviors do
|
||||
assert(behaviors[i])
|
||||
end
|
||||
|
||||
if not def.on_step then
|
||||
|
Loading…
Reference in New Issue
Block a user