Skip to content

Commit

Permalink
auto-checkpoint improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
kandowontu committed Feb 8, 2025
1 parent 41ed01f commit 602699c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions SAUCE/functions/reset_game_vars.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void reset_game_vars(){
practice_orbactive[tmp1] = orbactive;

long_temp_x = high_byte(player_x[0]);
auto_practicepoint_timer = 400;
auto_practicepoint_timer = 300;
}


Expand Down Expand Up @@ -148,7 +148,7 @@ void restore_practice_state() {

#undef quick_ld
currplayer_gravity = player_gravity[currplayer];
auto_practicepoint_timer = 400;
auto_practicepoint_timer = 300;
}

CODE_BANK_POP()
9 changes: 7 additions & 2 deletions SAUCE/gamestates/state_game.h
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,14 @@ void state_game(){

if ((controllingplayer->press_b) && practice_point_count && !(twoplayer && (options & oneptwoplayer))) crossPRGBankJump0(reset_game_vars);

if (auto_practicepoint_timer) auto_practicepoint_timer--;
if (auto_practicepoints && auto_practicepoint_timer) auto_practicepoint_timer--;

if (practice_point_count && !auto_practicepoint_timer) { crossPRGBankJump0(reset_game_vars); }
if (practice_point_count && !auto_practicepoint_timer) {
if (gamemode == 0 || gamemode == 2 || gamemode == 4 || gamemode == 5 || gamemode == 8) {
if (currplayer_vel_y == 0) crossPRGBankJump0(reset_game_vars);
}
else crossPRGBankJump0(reset_game_vars);
}

if (joypad1.press_right && DEBUG_MODE && !(options & platformer)) {
invert_gravity(currplayer_gravity);
Expand Down

0 comments on commit 602699c

Please sign in to comment.