mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Use absolute value for bouncy in collision (#11969)
[backport: removed devtest change and protocol_version comparison]
This commit is contained in:
parent
25373ad294
commit
62ad2c3bc1
2 changed files with 8 additions and 2 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