From a95a994153976dcb2229e2190b4579ae5b3f0ce8 Mon Sep 17 00:00:00 2001 From: furudee Date: Sat, 9 May 2026 14:23:29 +0300 Subject: [PATCH] #1579 - face diagonal cover properly --- .../Src/XComGame/Classes/XComIdleAnimationStateMachine.uc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/X2WOTCCommunityHighlander/Src/XComGame/Classes/XComIdleAnimationStateMachine.uc b/X2WOTCCommunityHighlander/Src/XComGame/Classes/XComIdleAnimationStateMachine.uc index 382ef2458..35b2f435a 100644 --- a/X2WOTCCommunityHighlander/Src/XComGame/Classes/XComIdleAnimationStateMachine.uc +++ b/X2WOTCCommunityHighlander/Src/XComGame/Classes/XComIdleAnimationStateMachine.uc @@ -1997,11 +1997,15 @@ state EvaluateStance // There may actually be no peekaround in the requested cover direction/peekside combination if( DesiredPeekSide == ePeekLeft && Unit.GetCoverType(DesiredCoverIndex)!=CT_None) { - DesiredFaceLocation = Unit.Location + `XWORLD.GetPeekLeftDirection(`IDX_TO_DIR(DesiredCoverIndex) , false) * 1000.0f; + /// HL-Docs: ref:Bugfixes; issue:1579 + /// Units orient themselves on diagonal cover properly + // Issue #1579 - replace second parameter with `IS_DIAGONAL_COVER(Unit.GetCoverPoint()) + DesiredFaceLocation = Unit.Location + `XWORLD.GetPeekLeftDirection(`IDX_TO_DIR(DesiredCoverIndex) , `IS_DIAGONAL_COVER(Unit.GetCoverPoint())) * 1000.0f; } else if( DesiredPeekSide == ePeekRight && Unit.GetCoverType(DesiredCoverIndex)!=CT_None) { - DesiredFaceLocation = Unit.Location + `XWORLD.GetPeekRightDirection(`IDX_TO_DIR(DesiredCoverIndex) , false) * 1000.0f; + // Issue #1579 - replace second parameter with `IS_DIAGONAL_COVER(Unit.GetCoverPoint()) + DesiredFaceLocation = Unit.Location + `XWORLD.GetPeekRightDirection(`IDX_TO_DIR(DesiredCoverIndex) , `IS_DIAGONAL_COVER(Unit.GetCoverPoint())) * 1000.0f; } // End Issue #269 else