Tweak blast radius of rocket and grenade
This commit is contained in:
parent
22b51cea14
commit
bb521f41c4
2 changed files with 5 additions and 4 deletions
|
@ -22,10 +22,10 @@ minetest.register_entity("shooter:grenade_entity", {
|
||||||
self.timer = self.timer + dtime
|
self.timer = self.timer + dtime
|
||||||
if self.timer > 0.2 then
|
if self.timer > 0.2 then
|
||||||
local pos = self.object:getpos()
|
local pos = self.object:getpos()
|
||||||
local below = {x=pos.x, y=pos.y - 1, z=pos.z}
|
local above = {x=pos.x, y=pos.y + 1, z=pos.z}
|
||||||
if minetest.get_node(below).name ~= "air" then
|
if minetest.get_node(pos).name ~= "air" then
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
shooter:blast(pos, 1, 25, 5, self.player)
|
shooter:blast(above, 2, 25, 5, self.player)
|
||||||
end
|
end
|
||||||
self.timer = 0
|
self.timer = 0
|
||||||
end
|
end
|
||||||
|
|
|
@ -28,9 +28,10 @@ minetest.register_entity("shooter:rocket_entity", {
|
||||||
self.timer = self.timer + dtime
|
self.timer = self.timer + dtime
|
||||||
if self.timer > 0.2 then
|
if self.timer > 0.2 then
|
||||||
local pos = self.object:getpos()
|
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
|
if minetest.get_node(pos).name ~= "air" then
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
shooter:blast(pos, 2, 50, 7, self.player)
|
shooter:blast(above, 4, 50, 8, self.player)
|
||||||
end
|
end
|
||||||
self.timer = 0
|
self.timer = 0
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue