From 09de511c37c32e13af3f72ded7f0f9e19f395ae2 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Fri, 5 Feb 2021 11:31:54 +0300 Subject: [PATCH] fixed plane AI --- src/control/CarCtrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp index c6d78882..d05d9827 100644 --- a/src/control/CarCtrl.cpp +++ b/src/control/CarCtrl.cpp @@ -2757,7 +2757,7 @@ void CCarCtrl::SteerAIPlaneTowardsTargetCoors(CAutomobile* pPlane) up.Normalise(); CVector forward(Cos(pPlane->m_fOrientation), Sin(pPlane->m_fOrientation), fForwardZ); forward.Normalise(); - CVector right = CrossProduct(forward, up); + CVector right = CrossProduct(up, forward); right.z -= 5.0f * pPlane->m_fPlaneSteer; right.Normalise(); up = CrossProduct(forward, right);