- fix tyre track creation on far distances

This commit is contained in:
Ilya Shurumov 2021-02-23 14:04:05 +06:00
parent 843f982195
commit 9c632a315d
2 changed files with 6 additions and 4 deletions

View File

@ -2898,7 +2898,7 @@ void DisplaySmoke(SMOKE* smoke)
v.vy = smoke->position.vy - camera_position.vy;
v.vz = smoke->position.vz - camera_position.vz;
if (v.vx > 20480 || v.vz > 20480)
if (ABS(v.vx) > 20480 || ABS(v.vz) > 20480)
return;
Apply_Inv_CameraMatrix(&v);

View File

@ -137,11 +137,13 @@ void AddTyreTrack(int wheel, int tracksAndSmoke, int padid)
newtp = &tyre_new_positions[wheel];
if (newtp->vx - camera_position.vx + 0x5000 > 0xa000)
// [A] disabled due to MP and SP bugs
/*
if (newtp->vx - camera_position.vx + 20480 > 40960)
return;
if (newtp->vz - camera_position.vz + 0x5000 > 0xa000)
return;
if (newtp->vz - camera_position.vz + 20480 > 40960)
return;*/
if (tracksAndSmoke == 0)
{