summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/control/CarCtrl.cpp2
-rw-r--r--src/control/Script3.cpp2
-rw-r--r--src/render/Particle.cpp6
3 files changed, 5 insertions, 5 deletions
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp
index 1023f2a3..6f47db05 100644
--- a/src/control/CarCtrl.cpp
+++ b/src/control/CarCtrl.cpp
@@ -2930,7 +2930,7 @@ void CCarCtrl::SteerAICarWithPhysicsHeadingForTarget(CVehicle* pVehicle, CPhysic
*pHandbrake = true;
float maxAngle = FindMaxSteerAngle(pVehicle);
steerAngle = Min(maxAngle, Max(-maxAngle, steerAngle));
- float speedMultiplier = FindSpeedMultiplier(angleToTarget - angleForward,
+ float speedMultiplier = FindSpeedMultiplier(CGeneral::GetATanOfXY(targetX - pVehicle->GetPosition().x, targetY - pVehicle->GetPosition().y) - angleForward,
MIN_ANGLE_FOR_SPEED_LIMITING, MAX_ANGLE_FOR_SPEED_LIMITING, MIN_LOWERING_SPEED_COEFFICIENT);
float speedTarget = pVehicle->AutoPilot.m_nCruiseSpeed * speedMultiplier;
float currentSpeed = pVehicle->GetMoveSpeed().Magnitude() * GAME_SPEED_TO_CARAI_SPEED;
diff --git a/src/control/Script3.cpp b/src/control/Script3.cpp
index 67d6fdda..aba06d03 100644
--- a/src/control/Script3.cpp
+++ b/src/control/Script3.cpp
@@ -2400,7 +2400,7 @@ int8 CRunningScript::ProcessCommands700To799(int32 command)
CPed* pLeader = CPools::GetPedPool()->GetAt(ScriptParams[1]);
script_assert(pPed);
script_assert(pLeader);
- UpdateCompareFlag(pPed->m_leader == pLeader);
+ UpdateCompareFlag(pPed->m_leader == pLeader && !pPed->bWaitForLeaderToComeCloser);
return 0;
}
default:
diff --git a/src/render/Particle.cpp b/src/render/Particle.cpp
index 0ad4681d..51249844 100644
--- a/src/render/Particle.cpp
+++ b/src/render/Particle.cpp
@@ -2331,9 +2331,9 @@ void CParticle::AddJetExplosion(CVector const &vecPos, float fPower, float fSize
vecStepPos,
CVector
(
- CGeneral::GetRandomNumberInRange(-0.2f, 0.2f),
- CGeneral::GetRandomNumberInRange(-0.2f, 0.2f),
- CGeneral::GetRandomNumberInRange(-0.2f, 0.0f)
+ CGeneral::GetRandomNumberInRange(-0.02f, 0.02f),
+ CGeneral::GetRandomNumberInRange(-0.02f, 0.02f),
+ CGeneral::GetRandomNumberInRange(-0.02f, 0.0f)
),
nil,
fSize, color, 0, 0, 0, 0);