Open MrGunflame opened 2 years ago
Should be mostly complete now. Someone glance over it again.
It works quite weird when you bunnyhoping down from low hills, and you also take damage during bunnyhop with some delay.
Really hard to reproduce, I believe what happened was that when you hit the ground and jump again before the server ticks, the fall damage is calculated for both jumps. Resetting the fall distance when moving up should fix this, but this behavior should only be applied to players.
Yep, looks like it is fixed. But there is another problem, sometimes when you fell down, the server does not register your fall at all, no one debug message about the missed fall. Demo
That's a really weird one, seems to only happen when, immediately after connecting, you jump from a cliff into another chunk causing the client to reload and for some reason teleporting a bit up, resetting the falling distance. I'm not sure how to solve this in the current implementation while not re-enabling the bunnyhopping issue. I guess there's a reason minecraft uses player velocity to calculate fall damage, but that's not implemented in feather yet (afaik).
I think this is mostly do to physics not being implemented on server side, which means we 100% rely on the data from the client.
Is this PR mergable ?
Currently this implementation works for mobs, but for players it's a little buggy due to entity physics not being implemented yet. I'd therefore wait until entity physics are implemented before merging this.
Health and Fall damage systems
Status
Description
Adds Health and Hunger components. Adds a health and fall damage system.
Related issues
358
Progress
Currently waiting for physics/velocity for correct player fall damage calcuation
Checklist
cargo fmt
,cargo clippy --all-targets
,cargo build --release
andcargo test
and fixed any generated errors!Used specific traces (if you trace actions please specify the cause i.e. the player)