Fix timer bug
This commit is contained in:
parent
ec33c93e8d
commit
19a2aff2cc
3 changed files with 7 additions and 6 deletions
10
game.h
10
game.h
|
@ -1283,9 +1283,9 @@ void LCR_gameDraw3DView(void)
|
|||
LCR_rendererDrawText(str,LCR_EFFECTIVE_RESOLUTION_X - // speed (bot., right)
|
||||
LCR_rendererComputeTextWidth(str,_FONT_SIZE) - LCR_GUI_GAP,
|
||||
LCR_EFFECTIVE_RESOLUTION_Y - LCR_rendererComputeTextHeight(_FONT_SIZE) -
|
||||
LCR_GUI_GAP,0,_FONT_SIZE);
|
||||
LCR_GUI_GAP,0,_FONT_SIZE);
|
||||
|
||||
LCR_gameTimeToStr(LCR_timeTicksToMS(LCR_game.runTime),str);
|
||||
LCR_gameTimeToStr(LCR_game.runTime,str);
|
||||
|
||||
if (LCR_game.state != LCR_GAME_STATE_RUN_FINISHED)
|
||||
LCR_rendererDrawText(str,LCR_GUI_GAP,LCR_EFFECTIVE_RESOLUTION_Y -
|
||||
|
@ -1593,8 +1593,6 @@ uint8_t LCR_gameStep(uint32_t time)
|
|||
#endif
|
||||
|
||||
uint32_t sleep = 0;
|
||||
int paused = LCR_game.state == LCR_GAME_STATE_MENU ||
|
||||
LCR_game.state == LCR_GAME_STATE_RUN_STARTING;
|
||||
|
||||
LCR_game.time = time;
|
||||
|
||||
|
@ -1624,12 +1622,14 @@ uint8_t LCR_gameStep(uint32_t time)
|
|||
else
|
||||
{
|
||||
LCR_gameHandleInput();
|
||||
|
||||
int paused = LCR_game.state == LCR_GAME_STATE_MENU ||
|
||||
LCR_game.state == LCR_GAME_STATE_RUN_STARTING;
|
||||
|
||||
// handle simulation:
|
||||
while (time >= LCR_game.nextRacingTickTime)
|
||||
{
|
||||
LCR_LOG2("gonna step racing engine");
|
||||
|
||||
unsigned int input =
|
||||
(LCR_game.cameraMode == LCR_CAMERA_MODE_FREE ||
|
||||
LCR_game.state == LCR_GAME_STATE_RUN_FINISHED) ? 0 :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue