diff --git a/scenes/constants.h b/scenes/constants.h index 2e51f1b..fc3530a 100644 --- a/scenes/constants.h +++ b/scenes/constants.h @@ -35,7 +35,7 @@ #define PLAYER_MAX_SPEED 800 #define WATER_FRICTION 7.5 -#define GROUND_X_FRICTION 5.8 +#define GROUND_X_FRICTION 6.1 #define GROUND_Y_FRICTION 1.0 #define ARROW_SPEED 350 diff --git a/scenes/game_systems.c b/scenes/game_systems.c index ad326d3..1fbf0f0 100644 --- a/scenes/game_systems.c +++ b/scenes/game_systems.c @@ -761,9 +761,10 @@ void friction_coefficient_update_system(Scene_t* scene) } CPlayerState_t* p_pstate = get_component(p_ent, CPLAYERSTATE_T); - if (p_pstate != NULL && (p_pstate->is_crouch & 1)) + if (p_pstate != NULL) { - p_ct->fric_coeff.x -= 4; + if (p_pstate->is_crouch & 1) p_ct->fric_coeff.x -= 4; + if ((p_mstate->ground_state & 1) && p_pstate->player_dir.x != 0) p_ct->fric_coeff.x *= 0.9; } } }