aboutsummaryrefslogtreecommitdiff
path: root/src/collision.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/collision.cpp')
-rw-r--r--src/collision.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/collision.cpp b/src/collision.cpp
index 2e788956d..4f2cba263 100644
--- a/src/collision.cpp
+++ b/src/collision.cpp
@@ -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 &&