Fix a few bugs

This commit is contained in:
Miloslav Ciz 2025-06-23 20:38:56 +02:00
parent ab70d727b8
commit bc55e84d5b
6 changed files with 48 additions and 32 deletions

9
game.h
View file

@ -1274,9 +1274,10 @@ void LCR_gameDraw3DView(void)
1
#endif
? LCR_GAME_UNIT -
((LCR_game.nextRacingTickTime - LCR_game.time) * LCR_GAME_UNIT)
(((int) (LCR_game.nextRacingTickTime - LCR_game.time)) * LCR_GAME_UNIT)
/ LCR_RACING_TICK_MS_RT // 32: magic constant
: _LCR_min(LCR_GAME_UNIT,32 * (LCR_game.time - LCR_game.stateStartTime));
: _LCR_min(LCR_GAME_UNIT,32 * ((int) (LCR_game.time -
LCR_game.stateStartTime)));
LCR_racingGetCarTransform(carTransform,carTransform + 3,
physicsInterpolationParam);
@ -1672,11 +1673,15 @@ void LCR_gameHandleInput(void)
{
LCR_LOG1("couldn't load replay");
LCR_gamePopupMessage(LCR_texts[LCR_TEXTS_FAIL]);
LCR_currentMap.blockCount = 0;
LCR_gameSetState(LCR_GAME_STATE_MENU);
}
else if (mapIndex == -1)
{
LCR_LOG1("couldn't load replay map");
LCR_gamePopupMessage(LCR_texts[LCR_TEXTS_FAIL]);
LCR_currentMap.blockCount = 0;
LCR_gameSetState(LCR_GAME_STATE_MENU);
}
else
LCR_gameSetState(LCR_GAME_STATE_LOADING);