mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00: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:
parent
258ae99491
commit
5d0b18a0d0
3 changed files with 10 additions and 4 deletions
|
@ -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 &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue