File tree Expand file tree Collapse file tree
X2WOTCCommunityHighlander/Src/XComGame/Classes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9679,15 +9679,24 @@ state XComMovement extends MoveState // Only accessed via specialized behavior t
96799679// Start Issue #1550
96809680simulated function MaybeUnblockPatrolMemberTiles ()
96819681{
9682+ local array <TTile > Tiles ;
9683+ local int UnitMobility ;
9684+
96829685 if ( m_kPlayer != None &&
96839686 m_kPlayer .m_kNav .IsPatrol (m_kUnit .ObjectID , m_kPatrolGroup ) &&
96849687 !m_kPatrolGroup .bDisableGroupMove &&
9685- (m_kPlayer .m_ePhase == eAAP_GreenPatrolMovement || m_kPlayer .IsScampering (UnitState .ObjectID )) &&
9686- class 'X2PathSolver' .static .IsUnitTrapped (UnitState ))
9688+ (m_kPlayer .m_ePhase == eAAP_GreenPatrolMovement || m_kPlayer .IsScampering (UnitState .ObjectID )) )
96879689 {
9688- m_kPatrolGroup . UnblockMemberTiles ();
9689- }
9690+ UnitMobility = m_kUnit . GetMobility ();
9691+ m_kUnit . m_kReachableTilesCache . GetAllPathableTiles ( Tiles );
96909692
9693+ // consider an unit that can't move at least its one action of movement "stuck" and unblock their patrol member tiles
9694+ if (Tiles .Length <= `METERSTOTILES (UnitMobility ))
9695+ {
9696+ m_kPatrolGroup .UnblockMemberTiles ();
9697+ m_kUnit .m_kReachableTilesCache .ForceCacheUpdate ();
9698+ }
9699+ }
96919700}
96929701// End Issue #1550
96939702
You can’t perform that action at this time.
0 commit comments