diff options
author | pecksin <78765996+pecksin@users.noreply.github.com> | 2022-02-16 17:06:00 -0500 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2022-05-14 18:33:42 +0200 |
commit | 62ad2c3bc1dd3a1a70d9eefbe2fac8fcbe426a1b (patch) | |
tree | 5bd5af4f3d02611f541080aa6b851f0bdacba65e /src/collision.cpp | |
parent | 25373ad294398b752ad0ef4a52a5585a0b957f0b (diff) | |
download | minetest-62ad2c3bc1dd3a1a70d9eefbe2fac8fcbe426a1b.tar.gz minetest-62ad2c3bc1dd3a1a70d9eefbe2fac8fcbe426a1b.tar.bz2 minetest-62ad2c3bc1dd3a1a70d9eefbe2fac8fcbe426a1b.zip |
Use absolute value for bouncy in collision (#11969)
[backport: removed devtest change and protocol_version comparison]
Diffstat (limited to 'src/collision.cpp')
-rw-r--r-- | src/collision.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/collision.cpp b/src/collision.cpp index d85a56884..ccc3a058d 100644 --- a/src/collision.cpp +++ b/src/collision.cpp @@ -303,7 +303,8 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef, if (!f.walkable) continue; - int n_bouncy_value = itemgroup_get(f.groups, "bouncy"); + // Negative bouncy may have a meaning, but we need +value here. + int n_bouncy_value = abs(itemgroup_get(f.groups, "bouncy")); int neighbors = 0; if (f.drawtype == NDT_NODEBOX && |