mirror of
https://github.com/luksamuk/engine-psx.git
synced 2025-04-28 13:28:02 +03:00
Fix Knuckles changing direction with zero speed
This commit is contained in:
parent
8269d7e316
commit
a6089ca702
1 changed files with 2 additions and 2 deletions
|
@ -1038,11 +1038,11 @@ player_update(Player *player)
|
|||
|
||||
// Turn to the other side
|
||||
if(input_pressed(&player->input, PAD_LEFT)
|
||||
&& (player->vel.vx > ONE)) {
|
||||
&& ((player->vel.vx > ONE) || (player->vel.vx == 0))) {
|
||||
player->vel.vz = player->vel.vx;
|
||||
player->glide_turn_dir = -1;
|
||||
} else if(input_pressed(&player->input, PAD_RIGHT)
|
||||
&& (player->vel.vx < -ONE)) {
|
||||
&& ((player->vel.vx < -ONE) || (player->vel.vx == 0))) {
|
||||
player->vel.vz = player->vel.vx;
|
||||
player->glide_turn_dir = 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue