Merge branch 'master' into mobf_2_2_dev

This commit is contained in:
sapier 2013-05-08 18:33:15 +02:00
commit c58d294754
2 changed files with 10 additions and 6 deletions

View File

@ -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,6 +666,8 @@ 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,

View File

@ -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