diff --git a/mobf/spawning.lua b/mobf/spawning.lua index c9fc40f..5a27922 100644 --- a/mobf/spawning.lua +++ b/mobf/spawning.lua @@ -642,7 +642,7 @@ function spawning.register_spawner_entity(mobname,secondary_mobname,spawndata,en on_step = function(self,dtime) self.spawner_time_passed = self.spawner_time_passed -dtime - + --self.spawner_time_passed has to be handled by spawnfunc! if self.spawner_time_passed < 0 then local starttime = mobf_get_time_ms() @@ -666,11 +666,13 @@ function spawning.register_spawner_entity(mobname,secondary_mobname,spawndata,en if self.spawner_mob_transform == nil then self.spawner_mob_transform = "" end + --TODO honor time since deactivation + self.spawner_time_passed = 1 end, - spawner_mob_name = mobname, - spawner_mob_transform = secondary_mobname, - spawner_time_passed = 1, + spawner_mob_name = mobname, + spawner_mob_transform = secondary_mobname, + spawner_time_passed = 1, spawner_mob_env = environment, spawner_mob_spawndata = spawndata, }) diff --git a/mobf/weapons.lua b/mobf/weapons.lua index 6323386..34eefcb 100644 --- a/mobf/weapons.lua +++ b/mobf/weapons.lua @@ -43,6 +43,8 @@ end ------------------------------------------------------------------------------- function mobf_do_area_damage(pos,immune,damage_groups,range) --damage objects within inner blast radius + mobf_assert_backtrace(type(range) ~= "table") + objs = minetest.env:get_objects_inside_radius(pos, range) for k, obj in pairs(objs) do @@ -298,10 +300,10 @@ function MOBF_PLASMABALL_ENTITY.on_step(self, dtime) if hit then --damage objects within inner blast radius - mobf_do_area_damage(pos,self.owner,self.damage_range/4,self.damage) + mobf_do_area_damage(pos,self.owner,self.damage,self.damage_range/4) --damage all objects within blast radius - mobf_do_area_damage(pos,self.owner,self.damage_range/2,self.damage) + mobf_do_area_damage(pos,self.owner,self.damage,self.damage_range/2) end -- vanish when hitting a node