forked from VoxeLibre/VoxeLibre
core:explosions: fix blast radius rounding
mc rounds to nearest int, do the same simplify the calculation
This commit is contained in:
parent
06132d01a8
commit
8fad74c90f
|
@ -459,7 +459,7 @@ function mcl_explosions.explode(pos, strength, info, direct, source)
|
|||
end
|
||||
|
||||
-- The maximum blast radius (in the air)
|
||||
local radius = math.ceil(1.3 * strength / (0.3 * 0.75) * 0.3)
|
||||
local radius = math.floor(1.3 * strength / 0.225 * 0.3 + 0.5)
|
||||
|
||||
if not sphere_shapes[radius] then
|
||||
sphere_shapes[radius] = compute_sphere_rays(radius)
|
||||
|
|
Loading…
Reference in New Issue