Skip to content

Commit

Permalink
Fix misrendered fall_damage_add_percent calculation formula (#13969)
Browse files Browse the repository at this point in the history
Co-authored-by: rubenwardy <rw@rubenwardy.com>
  • Loading branch information
MisterE123 and rubenwardy committed Nov 9, 2023
1 parent 3944507 commit fe8d04d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/lua_api.md
Expand Up @@ -2148,11 +2148,13 @@ to games.
* `fall_damage_add_percent`: modifies the fall damage suffered when hitting
the top of this node. There's also an armor group with the same name.
The final player damage is determined by the following formula:
```lua
damage =
collision speed
* ((node_fall_damage_add_percent + 100) / 100) -- node group
* ((player_fall_damage_add_percent + 100) / 100) -- player armor group
- (14) -- constant tolerance
```
Negative damage values are discarded as no damage.
* `falling_node`: if there is no walkable block under the node it will fall
* `float`: the node will not fall through liquids (`liquidtype ~= "none"`)
Expand Down

0 comments on commit fe8d04d

Please sign in to comment.