Fix time multiplier

This commit is contained in:
Miloslav Ciz 2025-06-12 16:54:56 +02:00
parent 60cf16c8de
commit 74013219e5
2 changed files with 18 additions and 12 deletions

View file

@ -56,7 +56,10 @@ typedef int32_t LCR_GameUnit; ///< Abstract game unit.
#define LCR_RACING_FPS 30 /**< Physics FPS, i.e. the number of
physics ticks per second. */
#define LCR_RACING_TICK_MS \
#define LCR_RACING_TICK_MS (1000 / LCR_RACING_FPS)
#define LCR_RACING_TICK_MS_RT \
(100000 / (LCR_RACING_FPS * LCR_SETTING_TIME_MULTIPLIER))
#define LCR_RACING_VERSION1 '0' ///< First part of physics eng. version.
@ -1202,8 +1205,9 @@ int _LCR_racingCarShapeOK(void)
}
/**
Updates the racing physics world, call every LCR_RACING_TICK_MS milliseconds.
Returns a set of events (logically ORed) that occured during this step.
Updates the racing physics world, call every LCR_RACING_TICK_MS_RT
milliseconds. Returns a set of events (logically ORed) that occured during
this step.
*/
uint32_t LCR_racingStep(unsigned int input)
{