From ff7af5c87dd6557574ae6d0dc992345f4ac5e027 Mon Sep 17 00:00:00 2001 From: Ilya Shurumov Date: Wed, 16 Dec 2020 04:07:26 +0600 Subject: [PATCH] - improve Civ AI acceleration when steering - attempt to fix Civ AI backwards crawl --- src_rebuild/GAME/C/CIV_AI.C | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src_rebuild/GAME/C/CIV_AI.C b/src_rebuild/GAME/C/CIV_AI.C index 6aa969c4..a09d5fb0 100644 --- a/src_rebuild/GAME/C/CIV_AI.C +++ b/src_rebuild/GAME/C/CIV_AI.C @@ -3636,6 +3636,7 @@ void CreateRoadblock(void) // [D] [T] int CivControl(CAR_DATA* cp) { + int thrust; CheckPingOut(cp); if (cp->controlType == CONTROL_TYPE_CIV_AI) @@ -3649,11 +3650,18 @@ int CivControl(CAR_DATA* cp) AttemptUnPark(cp); } - cp->thrust = CivAccel(cp); + if (cp->ai.c.thrustState != 3) cp->wheel_angle = CivSteerAngle(cp); + thrust = CivAccel(cp) - ABS(cp->wheel_angle) * 4; + + if (thrust < 0 && cp->hd.wheel_speed < 5) + thrust = 0; + + cp->thrust = thrust; + #if 0 { //maxCivCars = 2;