Update Platform.c
Fixed a bug where reversing the direction the player is running does not immediately change the sprite to match.
@@ -125,6 +125,7 @@ void Update_Platform() {
pl_vel_x -= WALK_ACC;
pl_vel_x = CLAMP(pl_vel_x, -MAX_WALK_VEL, -MIN_WALK_VEL);
}
+ player.rerender = TRUE;
} else if (INPUT_RIGHT) {
player.dir.x = 1;
if (INPUT_A) {
@@ -134,6 +135,7 @@ void Update_Platform() {
pl_vel_x += WALK_ACC;
pl_vel_x = CLAMP(pl_vel_x, MIN_WALK_VEL, MAX_WALK_VEL);
}
+ player.rerender = TRUE;
} else if (grounded) {
if (pl_vel_x < 0) {
pl_vel_x += RELEASE_DEC;
