Fix countdown bug

This commit is contained in:
Miloslav Ciz 2025-05-22 21:11:55 +02:00
parent 11853ae170
commit a208d0561e
3 changed files with 169 additions and 166 deletions

View file

@ -38,12 +38,11 @@ fuck issue trackers :D
=========== BUGS =================
- immediately after starting the map countdown seems to be lower (seems to
perhaps be caused by nextPhysicsFrameTime, look into it)
=========== HANDLED ==============
- should drifting make a sound? NO NEED
- immediately after starting the map countdown seems to be lower (seems to
perhaps be caused by nextPhysicsFrameTime, look into it)
- hitting ramps at higher speed still often bugs, try to fiddle with physics
again (reshape iterations, tension, ...); seem acceptable now maybe?
- in tiny resolution the sky jumps when rotating

12
game.h
View file

@ -248,8 +248,8 @@ void _LCR_logNum(uint32_t n)
#define LCR_GAME_STATE_RUN_STARTING 0x01
#define LCR_GAME_STATE_RUN 0x02
#define LCR_GAME_STATE_RUN_FINISHED 0x03
#define LCR_GAME_STATE_LOADING 0x04
#define LCR_GAME_STATE_LOADED 0x05
#define LCR_GAME_STATE_END 0xff
@ -1613,11 +1613,14 @@ uint8_t LCR_gameStep(uint32_t time)
LCR_currentMap.targetTime = LCR_racing.replay.achievedTime;
}
LCR_gameResetRun(
LCR_gameSetState(LCR_GAME_STATE_LOADED);
}
else if (LCR_game.state == LCR_GAME_STATE_LOADED)
LCR_gameResetRun( // start countdown now, loading the map lost many frames
LCR_game.menu.selectedTab == 2,
LCR_game.menu.selectedTab == 3);
}
else
{
LCR_gameHandleInput();
// handle simulation:
@ -1814,6 +1817,7 @@ uint8_t LCR_gameStep(uint32_t time)
LCR_game.physicsFrameMS = 0;
}
#endif
}
return 1;
}

View file

@ -191,7 +191,7 @@
#ifndef LCR_SETTING_COUNTDOWN_SECONDS
/** Run start countdown length in seconds. */
#define LCR_SETTING_COUNTDOWN_SECONDS 1 // for release make 3
#define LCR_SETTING_COUNTDOWN_SECONDS 3 //1 // for release make 3
#endif
#ifndef LCR_SETTING_MAP_CHUNK_RELOAD_INTERVAL