Continue replays
This commit is contained in:
parent
0487a87ae5
commit
17c182f474
2 changed files with 32 additions and 15 deletions
11
game.h
11
game.h
|
@ -278,13 +278,13 @@ LCR_GameUnit LCR_carSpeedKMH(void)
|
|||
LCR_RACING_FPS) / (8 * LCR_GAME_UNIT);
|
||||
}
|
||||
|
||||
void LCR_gameResetRun(void)
|
||||
void LCR_gameResetRun(uint8_t replay)
|
||||
{
|
||||
LCR_GameUnit carTransform[6];
|
||||
|
||||
LCR_LOG0("resetting run");
|
||||
LCR_mapReset();
|
||||
LCR_racingRestart();
|
||||
LCR_racingRestart(replay);
|
||||
LCR_rendererUnmarkCPs();
|
||||
LCR_racingGetCarTransform(carTransform,carTransform + 3,0);
|
||||
LCR_rendererSetCarTransform(carTransform,carTransform + 3);
|
||||
|
@ -754,7 +754,8 @@ void LCR_gameHandleInput(void)
|
|||
|
||||
case LCR_GAME_STATE_RUN_FINISHED:
|
||||
if (LCR_game.keyStates[LCR_KEY_A] == 1)
|
||||
LCR_gameResetRun();
|
||||
//LCR_gameResetRun(LCR_racing.playingReplay);
|
||||
LCR_gameResetRun(1);
|
||||
|
||||
break;
|
||||
|
||||
|
@ -806,7 +807,7 @@ void LCR_gameHandleInput(void)
|
|||
LCR_rendererMoveCamera(offsets,offsets + 3);
|
||||
}
|
||||
else if (LCR_game.keyStates[LCR_KEY_A] == 1)
|
||||
LCR_gameResetRun();
|
||||
LCR_gameResetRun(LCR_racing.playingReplay);
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -837,7 +838,7 @@ uint8_t LCR_gameStep(uint32_t time)
|
|||
if (LCR_game.state == LCR_GAME_STATE_LOADING_MAP)
|
||||
{
|
||||
LCR_rendererLoadMap();
|
||||
LCR_gameResetRun();
|
||||
LCR_gameResetRun(LCR_racing.playingReplay);
|
||||
}
|
||||
|
||||
LCR_gameHandleInput();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue