]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/collision.cpp
Merge branch 'master' of https://github.com/minetest/minetest
[dragonfireclient.git] / src / collision.cpp
index 2e788956de89889c805127a8e1c767ef9ae10e30..4f2cba2636d0b839b2ae5331d961b137e933f948 100644 (file)
@@ -153,7 +153,7 @@ CollisionAxis axisAlignedCollision(
                                                (std::max(movingbox.MaxEdge.Z + speed.Z * time, staticbox.MaxEdge.Z)
                                                        - std::min(movingbox.MinEdge.Z + speed.Z * time, staticbox.MinEdge.Z)
                                                        - relbox.MinEdge.Z < 0)
-                                       ) 
+                                       )
                                        return COLLISION_AXIS_X;
                        }
                } else {
@@ -180,7 +180,7 @@ CollisionAxis axisAlignedCollision(
                                                (std::max(movingbox.MaxEdge.Y + speed.Y * time, staticbox.MaxEdge.Y)
                                                        - std::min(movingbox.MinEdge.Y + speed.Y * time, staticbox.MinEdge.Y)
                                                        - relbox.MinEdge.Y < 0)
-                                       ) 
+                                       )
                                        return COLLISION_AXIS_Z;
                        }
                }
@@ -304,7 +304,8 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef,
                        if (!(f.walkable || (jesus && f.isLiquid())))
                                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 &&