1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00:00

Use absolute value for bouncy in collision (#11969)

* use abs(bouncy) in collision
* test case for negative bouncy
* send abs(bouncy) to old clients
This commit is contained in:
pecksin 2022-02-16 17:06:00 -05:00 committed by GitHub
parent 258ae99491
commit 5d0b18a0d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 4 deletions

View file

@ -252,9 +252,9 @@ for i=-100, 100, 25 do
end
-- Bouncy nodes (various bounce levels)
for i=20, 180, 20 do
for i=-140, 180, 20 do
local val = math.floor(((i-20)/200)*255)
minetest.register_node("testnodes:bouncy"..i, {
minetest.register_node(("testnodes:bouncy"..i):gsub("-","NEG"), {
description = S("Bouncy Node (@1%)", i),
groups = {bouncy=i, dig_immediate=3},