diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2019-09-01 16:02:23 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2019-09-01 16:02:23 +0200 |
commit | cd30a76dc58004fa47d6abab619d19718bcf3364 (patch) | |
tree | 544c4b74eb50bc56be44a9d5991ecc6b9cae5cc5 /src/control/CarCtrl.h | |
parent | Merge pull request #198 from ShFil119/audio6 (diff) | |
download | re3-cd30a76dc58004fa47d6abab619d19718bcf3364.tar re3-cd30a76dc58004fa47d6abab619d19718bcf3364.tar.gz re3-cd30a76dc58004fa47d6abab619d19718bcf3364.tar.bz2 re3-cd30a76dc58004fa47d6abab619d19718bcf3364.tar.lz re3-cd30a76dc58004fa47d6abab619d19718bcf3364.tar.xz re3-cd30a76dc58004fa47d6abab619d19718bcf3364.tar.zst re3-cd30a76dc58004fa47d6abab619d19718bcf3364.zip |
Diffstat (limited to '')
-rw-r--r-- | src/control/CarCtrl.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/control/CarCtrl.h b/src/control/CarCtrl.h index faf78f00..1ada47c7 100644 --- a/src/control/CarCtrl.h +++ b/src/control/CarCtrl.h @@ -64,6 +64,14 @@ public: static void Init(void); static void SlowCarDownForOtherCar(CEntity*, CVehicle*, float*, float); static float TestCollisionBetween2MovingRects(CVehicle*, CVehicle*, float, float, CVector*, CVector*, uint8); + static float FindAngleToWeaveThroughTraffic(CVehicle*, CPhysical*, float, float); + static float FindAngleToWeaveThroughTrafficTest(CVehicle*, CPhysical*, float, float); + static void WeaveThroughCarsSectorList(CPtrList&, CVehicle*, CPhysical*, float, float, float, float, float*, float*); + static void WeaveForOtherCar(CEntity*, CVehicle*, float*, float*); + static void WeaveThroughPedsSectorList(CPtrList&, CVehicle*, CPhysical*, float, float, float, float, float*, float*); + static void WeaveForPed(CEntity*, CVehicle*, float*, float*); + static void WeaveThroughObjectsSectorList(CPtrList&, CVehicle*, float, float, float, float, float*, float*); + static void WeaveForObject(CEntity*, CVehicle*, float*, float*); static float GetOffsetOfLaneFromCenterOfRoad(int8 lane, CCarPathLink* pLink) { @@ -77,6 +85,16 @@ public: return (float)timeInCurve / pVehicle->AutoPilot.m_nTimeToSpendOnCurrentCurve; } + /* Used very often and differs from CGeneral::LimitRadianAngle */ + static float LimitRadianAngle(float angle) + { + while (angle < -PI) + angle += TWOPI; + while (angle > PI) + angle -= TWOPI; + return angle; + } + static int32 &NumLawEnforcerCars; static int32 &NumAmbulancesOnDuty; static int32 &NumFiretrucksOnDuty; |