aboutsummaryrefslogtreecommitdiff
path: root/src/collision.cpp
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2022-05-17 22:12:00 +0200
committerElias Fleckenstein <eliasfleckenstein@web.de>2022-05-17 22:12:00 +0200
commit21df26984da91143c15587f5a03c98d68c3adc4e (patch)
treeaaa707a628ad331f67890023dffe1b4f60dd01d3 /src/collision.cpp
parentb09fc5de5cdb021f43ad32b7e3f50dc75c0bc622 (diff)
parenteabf05758e3ba5f6f4bb1b8d1d1f02179b84e410 (diff)
downloaddragonfireclient-21df26984da91143c15587f5a03c98d68c3adc4e.tar.xz
Merge branch 'master' of https://github.com/minetest/minetest
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 &&