Skip to content

Commit

Permalink
Fix check_gravity() typo.
Browse files Browse the repository at this point in the history
I had accidently removed velocity halt when entities completed a fall in commit 977513a. This caused a "slide" bug where fallen entities woud continue moving along X axis.
  • Loading branch information
DCurrent committed Aug 8, 2018
1 parent 24e96fe commit be0a5fe
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions engine/openbor.c
Original file line number Diff line number Diff line change
Expand Up @@ -20364,6 +20364,13 @@ void check_gravity(entity *e)
if (savedata.joyrumble[i]) control_rumble(i, 1, 75 * (int)self->velocity.y / 2);
}
}
else if((!self->animation->move[self->animpos]->base || self->animation->move[self->animpos]->base < 0) &&
(!self->animation->move[self->animpos]->axis.y || self->animation->move[self->animpos]->axis.y <= 0))
{
self->velocity.x = 0;
self->velocity.z = 0;
self->velocity.y = 0;
}
else
{
self->velocity.y = 0;
Expand Down

0 comments on commit be0a5fe

Please sign in to comment.