Tweak blast radius of rocket and grenade

This commit is contained in:
stujones11 2015-12-16 18:18:23 +00:00
parent 22b51cea14
commit bb521f41c4
2 changed files with 5 additions and 4 deletions

View file

@ -22,10 +22,10 @@ minetest.register_entity("shooter:grenade_entity", {
self.timer = self.timer + dtime
if self.timer > 0.2 then
local pos = self.object:getpos()
local below = {x=pos.x, y=pos.y - 1, z=pos.z}
if minetest.get_node(below).name ~= "air" then
local above = {x=pos.x, y=pos.y + 1, z=pos.z}
if minetest.get_node(pos).name ~= "air" then
self.object:remove()
shooter:blast(pos, 1, 25, 5, self.player)
shooter:blast(above, 2, 25, 5, self.player)
end
self.timer = 0
end

View file

@ -28,9 +28,10 @@ minetest.register_entity("shooter:rocket_entity", {
self.timer = self.timer + dtime
if self.timer > 0.2 then
local pos = self.object:getpos()
local above = {x=pos.x, y=pos.y + 1, z=pos.z}
if minetest.get_node(pos).name ~= "air" then
self.object:remove()
shooter:blast(pos, 2, 50, 7, self.player)
shooter:blast(above, 4, 50, 8, self.player)
end
self.timer = 0
end