Fix TCC
This commit is contained in:
parent
09031d209d
commit
5522f03daf
6 changed files with 57 additions and 29 deletions
8
racing.h
8
racing.h
|
@ -984,10 +984,16 @@ void _LCR_racingUpdateCarPosRot(void)
|
|||
{
|
||||
TPE_Vec3 tmpVec = LCR_racing.carPositions[0];
|
||||
|
||||
TPE_Unit tccFix = tmpVec.x; /* Fix for TCC: for whatever reason the following
|
||||
line nukes the x coord in tmpVec under TCC, so
|
||||
here we back it up and then restore it. */
|
||||
|
||||
LCR_racing.carPositions[0] = _LCR_TPE_vec3DividePlain(
|
||||
TPE_vec3TimesPlain(_LCR_racingGetWheelCenterPoint(),LCR_GAME_UNIT),
|
||||
LCR_PHYSICS_UNIT);
|
||||
|
||||
tmpVec.x = tccFix;
|
||||
|
||||
LCR_racing.carPositions[0] = // smooth the position
|
||||
TPE_vec3KeepWithinBox(LCR_racing.carPositions[1],LCR_racing.carPositions[0],
|
||||
TPE_vec3(
|
||||
|
@ -1136,12 +1142,10 @@ void LCR_racingGetCarTransform(LCR_GameUnit position[3],
|
|||
LCR_racing.carRotations[1].y,interpolationParam);
|
||||
rotation[2] = _LCR_racingInterpolateRot(LCR_racing.carRotations[0].z,
|
||||
LCR_racing.carRotations[1].z,interpolationParam);
|
||||
|
||||
#else
|
||||
position[0] = LCR_racing.carPositions[0].x;
|
||||
position[1] = LCR_racing.carPositions[0].y;
|
||||
position[2] = LCR_racing.carPositions[0].z;
|
||||
|
||||
rotation[0] = LCR_racing.carRotations[0].x;
|
||||
rotation[1] = LCR_racing.carRotations[0].y;
|
||||
rotation[2] = LCR_racing.carRotations[0].z;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue