fix missing local round function
This commit is contained in:
parent
caa12a7d96
commit
72630588cf
13
darts.lua
13
darts.lua
@ -1,3 +1,16 @@
|
|||||||
|
local function round(n)
|
||||||
|
|
||||||
|
if (n > 0) then
|
||||||
|
return n % 1 >= 0.5 and math.ceil(n) or math.floor(n)
|
||||||
|
else
|
||||||
|
n = -n
|
||||||
|
|
||||||
|
local t = n % 1 >= 0.5 and math.ceil(n) or math.floor(n)
|
||||||
|
|
||||||
|
return -t
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local function duck_explosion(pos)
|
local function duck_explosion(pos)
|
||||||
|
|
||||||
if minetest.is_protected(pos, "") then
|
if minetest.is_protected(pos, "") then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user