Fix a few bugs

This commit is contained in:
Miloslav Ciz 2025-06-25 16:55:30 +02:00
parent f0e7ca8e33
commit 1b363995a6
5 changed files with 57 additions and 55 deletions

7
game.h
View file

@ -1389,7 +1389,7 @@ void LCR_gameSaveReplay(void)
for (int i = 0; i < LCR_MAP_NAME_MAX_LEN; ++i)
if (LCR_currentMap.name[i])
_LCR_gameDataCharWrite(LCR_currentMap.name[i]);
_LCR_gameDataCharWrite(LCR_currentMap.name[i]);
else
break;
@ -1400,7 +1400,7 @@ void LCR_gameSaveReplay(void)
for (int i = (str[0] == '0' && str[1] == '0' ? 3 : 0);
i < LCR_MAP_NAME_MAX_LEN; ++i)
if (str[i])
_LCR_gameDataCharWrite(str[i]);
_LCR_gameDataCharWrite(str[i]);
else
break;
@ -1881,7 +1881,8 @@ uint8_t LCR_gameStep(uint32_t time)
LCR_audioSetEngineIntensity(paused ? 0 :
(engineIntensity < 256 ? engineIntensity : 255));
if (LCR_game.state != LCR_GAME_STATE_RUN_FINISHED)
if (LCR_game.state == LCR_GAME_STATE_RUN ||
LCR_game.state == LCR_GAME_STATE_RUN_STARTING)
LCR_game.runTime = LCR_racing.tick;
LCR_game.nextRacingTickTime += LCR_RACING_TICK_MS_RT;