mirror of
https://github.com/GTAmodding/re3.git
synced 2025-07-14 04:44:09 +00:00
Added enum to OnscreenTimer, fixed mistakes in CCarCtrl::SteerAIBoatWithPhysicsHeadingForTarget
This commit is contained in:
parent
e2f8ad983d
commit
3d69148497
4 changed files with 18 additions and 12 deletions
|
@ -2421,8 +2421,8 @@ void CCarCtrl::SteerAIBoatWithPhysicsHeadingForTarget(CBoat* pBoat, float target
|
|||
float angleForward = CGeneral::GetATanOfXY(forward.x, forward.y);
|
||||
float angleDiff = LimitRadianAngle(angleToTarget - angleForward);
|
||||
angleDiff = min(DEFAULT_MAX_STEER_ANGLE, max(-DEFAULT_MAX_STEER_ANGLE, angleDiff));
|
||||
float currentSpeed = pBoat->GetMoveSpeed().Magnitude(); // +0.0f for some reason
|
||||
float speedDiff = pBoat->AutoPilot.m_nCruiseSpeed - currentSpeed;
|
||||
float currentSpeed = pBoat->GetMoveSpeed().Magnitude2D(); // +0.0f for some reason
|
||||
float speedDiff = pBoat->AutoPilot.m_nCruiseSpeed - currentSpeed * 60.0f;
|
||||
if (speedDiff > 0.0f){
|
||||
float accRemaining = speedDiff / pBoat->AutoPilot.m_nCruiseSpeed;
|
||||
*pAccel = (accRemaining > 0.25f) ? 1.0f : 1.0f - (0.25f - accRemaining) * 4.0f;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue