Skip to content

Commit

Permalink
Fixed Knuckles sliding into a spring
Browse files Browse the repository at this point in the history
Intended behavior confirmed with Sonic 3K.
First issue reported in #248
  • Loading branch information
AlexKhayrullin committed Feb 15, 2022
1 parent 0c94b37 commit 7ff7298
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion SonicTimeTwisted.gmx/scripts/player_reaction_spring.gml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,15 @@ argument0.force *=0.5;
spring_hspeed = -sine[rotation_offset]*argument0.force;
spring_vspeed = -cosine[rotation_offset]*argument0.force;
// bounce from spring
if (spring_hspeed!=0) {xspeed = spring_hspeed; facing = sign(xspeed);}
if (spring_hspeed!=0) {
xspeed = spring_hspeed;
facing = sign(xspeed);
// cancelling Knuckles gliding/sliding
if (state == player_state_glide || state == player_state_glide_slide)
{
player_is_running();
}
}
if (spring_vspeed==0) {if landed sliding = 16;} else
{
// states and flags
Expand Down

0 comments on commit 7ff7298

Please sign in to comment.