Skip to content

Commit a95a994

Browse files
committed
#1579 - face diagonal cover properly
1 parent 1e87269 commit a95a994

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

X2WOTCCommunityHighlander/Src/XComGame/Classes/XComIdleAnimationStateMachine.uc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1997,11 +1997,15 @@ state EvaluateStance
19971997
// There may actually be no peekaround in the requested cover direction/peekside combination
19981998
if( DesiredPeekSide == ePeekLeft && Unit.GetCoverType(DesiredCoverIndex)!=CT_None)
19991999
{
2000-
DesiredFaceLocation = Unit.Location + `XWORLD.GetPeekLeftDirection(`IDX_TO_DIR(DesiredCoverIndex) , false) * 1000.0f;
2000+
/// HL-Docs: ref:Bugfixes; issue:1579
2001+
/// Units orient themselves on diagonal cover properly
2002+
// Issue #1579 - replace second parameter with `IS_DIAGONAL_COVER(Unit.GetCoverPoint())
2003+
DesiredFaceLocation = Unit.Location + `XWORLD.GetPeekLeftDirection(`IDX_TO_DIR(DesiredCoverIndex) , `IS_DIAGONAL_COVER(Unit.GetCoverPoint())) * 1000.0f;
20012004
}
20022005
else if( DesiredPeekSide == ePeekRight && Unit.GetCoverType(DesiredCoverIndex)!=CT_None)
20032006
{
2004-
DesiredFaceLocation = Unit.Location + `XWORLD.GetPeekRightDirection(`IDX_TO_DIR(DesiredCoverIndex) , false) * 1000.0f;
2007+
// Issue #1579 - replace second parameter with `IS_DIAGONAL_COVER(Unit.GetCoverPoint())
2008+
DesiredFaceLocation = Unit.Location + `XWORLD.GetPeekRightDirection(`IDX_TO_DIR(DesiredCoverIndex) , `IS_DIAGONAL_COVER(Unit.GetCoverPoint())) * 1000.0f;
20052009
}
20062010
// End Issue #269
20072011
else

0 commit comments

Comments
 (0)