- fix tyre track sides being swapped

This commit is contained in:
InspirationByte 2022-02-04 21:15:00 +03:00
parent 4086bbaf9c
commit 6b780a822b
2 changed files with 12 additions and 11 deletions

View File

@ -1490,10 +1490,6 @@ void CheckCarEffects(CAR_DATA* cp, int player_id)
char tracks_and_smoke;
char channel, desired_skid, desired_wheel;
wheels_on_ground = 0;
lay_down_tracks = 0;
tracks_and_smoke = 0;
if (cp->controlType != CONTROL_TYPE_PLAYER &&
cp->controlType != CONTROL_TYPE_LEAD_AI &&
cp->controlType != CONTROL_TYPE_CUTSCENE)
@ -1508,6 +1504,10 @@ void CheckCarEffects(CAR_DATA* cp, int player_id)
// [A] do hubcaps here
HandlePlayerHubcaps(player_id);
wheels_on_ground = 0;
lay_down_tracks = 0;
tracks_and_smoke = 0;
for (cnt = 0; cnt < 4; cnt++)
{
if (cp->hd.wheel[cnt].susCompression != 0)

View File

@ -76,19 +76,20 @@ void GetTyreTrackPositions(CAR_DATA *cp, int player_id)
CarPos.vz = cp->hd.where.t[2];
car_cos = cp->ap.carCos;
SetRotMatrix(&cp->hd.drawCarMat);
SetRotMatrix(&cp->hd.where);
steps = 4 / MAX_TYRE_TRACK_WHEELS;
for (loop = 0; loop < 4; loop += steps)
{
WheelPos.vx = car_cos->wheelDisp[loop].vx;
if (loop & 2)
WheelPos.vx = car_cos->wheelDisp[loop].vx + 17;
WheelPos.vx += 17;
else
WheelPos.vx = car_cos->wheelDisp[loop].vx - 17;
WheelPos.vx -= 17;
WheelPos.vy = 0;
WheelPos.vz = -car_cos->wheelDisp[loop + 1 & 3].vz;
WheelPos.vz = car_cos->wheelDisp[loop + 1 & 3].vz;
_MatrixRotate(&WheelPos);