Skip to content

Commit

Permalink
Issue #1193 - Fix AI timeout on unconscious units
Browse files Browse the repository at this point in the history
  • Loading branch information
Tepa00 authored Aug 10, 2023
1 parent d16a594 commit bc54627
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion X2WOTCCommunityHighlander/Src/XComGame/Classes/XGAIPlayer.uc
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,11 @@ simulated function GatherUnitsToMove()
//
// Issue #510 - Removed the DecisionStartHistoryIndex check as it prevents pod leaders from using
// any reflex actions they may have been granted.
if(bDead || UnitState.bRemovedFromPlay || UnitState.NumAllActionPoints() == 0) // || kBehavior == None || kBehavior.DecisionStartHistoryIndex > kAIPlayerData.m_iLastEndTurnHistoryIndex)
/// HL-Docs: ref:Bugfixes; issue:1193
/// Added `IsUnconcious` and `IsBleedingOut` check to skip AI units in group who are Unconcious or Bleeding out
/// as the AI processing hangs here until it times out, which causes the rest of the group to be skipped.
if(bDead || UnitState.bRemovedFromPlay || UnitState.NumAllActionPoints() == 0 || UnitState.IsUnconscious() || UnitState.IsBleedingOut()) // || kBehavior == None || kBehavior.DecisionStartHistoryIndex > kAIPlayerData.m_iLastEndTurnHistoryIndex)
{
continue;
}
Expand Down

0 comments on commit bc54627

Please sign in to comment.