Skip to content

Commit

Permalink
[Minor] Ground units being lifted will not turn to attacker (#1548)
Browse files Browse the repository at this point in the history
Now ground units being lifted will not turn to attacker weirdly.
  • Loading branch information
CrimRecya authored Feb 25, 2025
1 parent 8edd4d3 commit 8925058
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Ext/TechnoType/Hooks.MatrixOp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8925058

Please sign in to comment.