From 8ab75ff0b9999fc014bf84ef95e7268c2ae42419 Mon Sep 17 00:00:00 2001 From: Ilya Shurumov Date: Sat, 28 Aug 2021 22:20:01 +0600 Subject: [PATCH] - slight PlaceCameraFollowCar computation improvement --- src_rebuild/Game/C/camera.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src_rebuild/Game/C/camera.c b/src_rebuild/Game/C/camera.c index 9466cbb3..b716919c 100644 --- a/src_rebuild/Game/C/camera.c +++ b/src_rebuild/Game/C/camera.c @@ -444,10 +444,15 @@ void PlaceCameraFollowCar(PLAYER *lp) if(car_cos) { + int addDist; + carheight = car_cos->colBox.vy * -3 + 85; + // [A] default just adds 248, but it's too close for big vehicles + addDist = MAX(248, car_cos->colBox.vy * 3); + if (gCameraMaxDistance == 0) - maxCameraDist = car_cos->colBox.vz * 2 + car_cos->colBox.vy + 248; + maxCameraDist = car_cos->colBox.vz * 2 + car_cos->colBox.vy + addDist; else maxCameraDist = gCameraMaxDistance;