mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02: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:
@@ -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 &&
|
||||
|
Reference in New Issue
Block a user