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
aff4216ccf
commit
12c2807807
|
@ -459,7 +459,7 @@ function mcl_explosions.explode(pos, strength, info, direct, source)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- The maximum blast radius (in the air)
|
-- 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
|
if not sphere_shapes[radius] then
|
||||||
sphere_shapes[radius] = compute_sphere_rays(radius)
|
sphere_shapes[radius] = compute_sphere_rays(radius)
|
||||||
|
|
Loading…
Reference in New Issue