Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IsIncapacitated check to GatherUnitsToMove #1193 #1194

Merged
merged 4 commits into from
Aug 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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