diff --git a/src/object_state_update.c b/src/object_state_update.c index 5133602..469b610 100644 --- a/src/object_state_update.c +++ b/src/object_state_update.c @@ -402,10 +402,8 @@ _spring_update(ObjectState *state, ObjectTableEntry *, VECTOR *pos, uint8_t is_r player.anim_dir = -1; state->anim_state.animation = 1; sound_play_vag(sfx_sprn, 0); - if(player.action != ACTION_ROLLING) { + if(player.action != ACTION_ROLLING) player_set_action(&player, ACTION_NONE); - player.sliding = 0; - } } else if(state->flipmask & MASK_FLIP_ROTCW) { // Right-pointing spring //player.pos.vx = (solidity_vx + solidity_w + player_width + 8) << 12; player.ev_left.collided = 0; // Detach player from left wall if needed @@ -415,10 +413,8 @@ _spring_update(ObjectState *state, ObjectTableEntry *, VECTOR *pos, uint8_t is_r player.anim_dir = 1; state->anim_state.animation = 1; sound_play_vag(sfx_sprn, 0); - if(player.action != ACTION_ROLLING) { + if(player.action != ACTION_ROLLING) player_set_action(&player, ACTION_NONE); - player.sliding = 0; - } } else if(state->flipmask == 0) { // Top-pointing spring player.pos.vy = (solidity_vy - (player_height >> 1)) << 12; player.grnd = 0; diff --git a/src/player.c b/src/player.c index 1f2190e..c28dd20 100644 --- a/src/player.c +++ b/src/player.c @@ -1726,6 +1726,8 @@ player_set_action(Player *player, PlayerAction action) if(player->action == ACTION_HURT) { player->ctrllock = 0; player->iframes = PLAYER_HURT_IFRAMES; + } else if(player->action == ACTION_GLIDE) { + player->sliding = 0; } player->action = action; }