Add air slowdown

This commit is contained in:
Miloslav Ciz 2025-04-20 21:51:11 +02:00
parent d905718bab
commit 76cc3227bb
3 changed files with 41 additions and 24 deletions

View file

@ -1279,6 +1279,14 @@ uint32_t LCR_racingStep(unsigned int input)
for (int j = 0; j < 3; ++j)
LCR_racing.carBody.joints[i].velocity[j] =
LCR_racing.carBody.joints[LCR_CAR_JOINTS - 1].velocity[j];
// gradual slowing down mid-air:
LCR_racing.carBody.joints[4].velocity[0] =
15 * (LCR_racing.carBody.joints[4].velocity[0] / 16);
LCR_racing.carBody.joints[4].velocity[2] =
15 * (LCR_racing.carBody.joints[4].velocity[2] / 16);
}
if (input & (LCR_RACING_INPUT_FORW | LCR_RACING_INPUT_BACK))