aboutsummaryrefslogtreecommitdiff
path: root/src/engine/player_controller.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/player_controller.c')
-rw-r--r--src/engine/player_controller.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/engine/player_controller.c b/src/engine/player_controller.c
index 0148792..7e2e678 100644
--- a/src/engine/player_controller.c
+++ b/src/engine/player_controller.c
@@ -37,6 +37,10 @@ void hh_player_actions(hh_entity* player){
*player = hh_background_collision ( *player, player_new);
+
+ if (direction_x != 0) {
+ player->render.fam.horizontal_flip = (direction_x > 0 ?0:1);
+ }
}