Improvements
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user