- improve Civ AI acceleration when steering

- attempt to fix Civ AI backwards crawl
This commit is contained in:
Ilya Shurumov 2020-12-16 04:07:26 +06:00
parent c8bd9c59f8
commit ff7af5c87d

View File

@ -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;