Add air slowdown
This commit is contained in:
parent
d905718bab
commit
76cc3227bb
3 changed files with 41 additions and 24 deletions
8
racing.h
8
racing.h
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue