Fix misrendered fall_damage_add_percent calculation formula (#13969)

Co-authored-by: rubenwardy <rw@rubenwardy.com>
This commit is contained in:
MisterE123 2023-11-09 13:55:26 -05:00 committed by GitHub
parent 394450758e
commit fe8d04d0b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2148,11 +2148,13 @@ to games.
* `fall_damage_add_percent`: modifies the fall damage suffered when hitting * `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 top of this node. There's also an armor group with the same name.
The final player damage is determined by the following formula: The final player damage is determined by the following formula:
```lua
damage = damage =
collision speed collision speed
* ((node_fall_damage_add_percent + 100) / 100) -- node group * ((node_fall_damage_add_percent + 100) / 100) -- node group
* ((player_fall_damage_add_percent + 100) / 100) -- player armor group * ((player_fall_damage_add_percent + 100) / 100) -- player armor group
- (14) -- constant tolerance - (14) -- constant tolerance
```
Negative damage values are discarded as no damage. Negative damage values are discarded as no damage.
* `falling_node`: if there is no walkable block under the node it will fall * `falling_node`: if there is no walkable block under the node it will fall
* `float`: the node will not fall through liquids (`liquidtype ~= "none"`) * `float`: the node will not fall through liquids (`liquidtype ~= "none"`)