Improvements

This commit is contained in:
2022-11-26 13:52:38 -05:00
parent 512918f24c
commit cf67a8046b
46 changed files with 56 additions and 79 deletions

View File

@@ -153,7 +153,7 @@ local function entity_physics(pos, radius, drops)
local obj_pos = obj:get_pos()
local dist = math.max(1, vector.distance(pos, obj_pos))
local damage = (4 / dist) * radius * 8
local damage = (4 / dist) * radius
if obj:is_player() then
local dir = vector.normalize(vector.subtract(obj_pos, pos))
local moveoff = vector.multiply(dir, 2 / dist * radius)
@@ -403,8 +403,7 @@ function explosives.boom(pos, def)
local owner = def.owner
local sound = def.sound or "tnt_explode"
minetest.sound_play(sound, {pos = pos, gain = 2.5,
max_hear_distance = math.min(def.radius * 30, 128)}, true)
minetest.sound_play(sound, {pos = pos, gain = 2.5, max_hear_distance = def.radius * 30}, true)
local drops, radius = tnt_explode(pos, def.radius, true, def.ignore_on_blast, owner, true)
-- append entity drops
local damage_radius = (radius / math.max(1, def.radius)) * def.damage_radius