Skip to content

Commit

Permalink
fix: no more auto jumping after win/lose
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahkittyy committed Oct 29, 2022
1 parent 5f6d391 commit 2e320ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions game/world.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void world::m_restart_world() {
m_player.setScale(1, 1);
m_mt_mgr.restart();
m_time_airborne = sf::seconds(999);
m_jumping = false;
m_jumping = true;
m_dashing = false;
m_since_wallkick = sf::seconds(999);
m_left_last_frame = false;
Expand Down Expand Up @@ -143,7 +143,7 @@ void world::update(sf::Time dt) {
m_space_to_retry.setColor(opacity);
m_game_clear.setColor(opacity);
if (m_just_jumped()) {
m_restart_world();
return m_restart_world();
} else {
m_jump_last_frame = jump_keyed;
return;
Expand All @@ -156,7 +156,7 @@ void world::update(sf::Time dt) {
m_space_to_retry.setColor(opacity);
m_game_over.setColor(opacity);
if (m_just_jumped()) {
m_restart_world();
return m_restart_world();
} else {
m_jump_last_frame = jump_keyed;
return;
Expand Down

0 comments on commit 2e320ae

Please sign in to comment.