Interpolate rotations
This commit is contained in:
parent
f83e7f519d
commit
09031d209d
3 changed files with 36 additions and 17 deletions
8
game.h
8
game.h
|
@ -1865,6 +1865,14 @@ uint8_t LCR_gameStep(uint32_t time)
|
|||
|
||||
int engineIntensity = LCR_carSpeedKMH() * 2;
|
||||
|
||||
if (LCR_game.state == LCR_GAME_STATE_RUN_FINISHED)
|
||||
{
|
||||
engineIntensity -= LCR_game.time - LCR_game.stateStartTime;
|
||||
|
||||
if (engineIntensity < 0)
|
||||
engineIntensity = 0;
|
||||
}
|
||||
|
||||
LCR_audioSetEngineIntensity(paused ? 0 :
|
||||
(engineIntensity < 256 ? engineIntensity : 255));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue