From 89250580972ea972ba6fc69a10f3d979cface97e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=AF=E7=BA=A2=E7=83=AD=E8=8C=B6?= <335958461@qq.com> Date: Tue, 25 Feb 2025 17:05:31 +0800 Subject: [PATCH] [Minor] Ground units being lifted will not turn to attacker (#1548) Now ground units being lifted will not turn to attacker weirdly. --- src/Ext/TechnoType/Hooks.MatrixOp.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Ext/TechnoType/Hooks.MatrixOp.cpp b/src/Ext/TechnoType/Hooks.MatrixOp.cpp index 51cde07e68..2f459caf98 100644 --- a/src/Ext/TechnoType/Hooks.MatrixOp.cpp +++ b/src/Ext/TechnoType/Hooks.MatrixOp.cpp @@ -149,7 +149,8 @@ Matrix3D* __stdcall JumpjetLocomotionClass_Draw_Matrix(ILocomotion* iloco, Matri // Man, what can I say, you don't want to stick your rotor into the ground auto slope_idx = MapClass::Instance->GetCellAt(linked->Location)->SlopeIndex; *ret = Matrix3D::VoxelRampMatrix[onGround ? slope_idx : 0]; - auto curf = pThis->LocomotionFacing.Current(); + // Only use LocomotionFacing for general Jumpjet to avoid the problem that ground units being lifted will turn to attacker weirdly. + auto curf = linked->IsAttackedByLocomotor ? linked->PrimaryFacing.Current() : pThis->LocomotionFacing.Current(); ret->RotateZ((float)curf.GetRadian<32>()); float arf = linked->AngleRotatedForwards; float ars = linked->AngleRotatedSideways;