mirror of
https://github.com/xtreme8000/CavEX.git
synced 2025-01-22 09:11:55 -05:00
Fix falling too fast with block above player
This commit is contained in:
parent
2c3c59703a
commit
fab3b9a343
1 changed files with 3 additions and 2 deletions
|
@ -150,8 +150,9 @@ static bool entity_tick(struct entity* e) {
|
|||
new_vel[1] = -0.6F;
|
||||
entity_try_move(e, new_pos, new_vel, &bbox, 1, &collision, &ground);
|
||||
|
||||
if(glm_vec3_distance2(e->pos_old, e->pos)
|
||||
< glm_vec3_distance2(e->pos_old, new_pos)) {
|
||||
if(new_pos[1] > e->pos_old[1]
|
||||
&& glm_vec3_distance2(e->pos_old, e->pos)
|
||||
< glm_vec3_distance2(e->pos_old, new_pos)) {
|
||||
collision_xz = collision;
|
||||
e->on_ground = ground;
|
||||
glm_vec3_copy(new_pos, e->pos);
|
||||
|
|
Loading…
Reference in a new issue