Skip to content

Commit

Permalink
Add config check to disable multitarget red alert on yelling
Browse files Browse the repository at this point in the history
Better fixes X2CommunityCore#717

Disables the red alert effect at the source instead of just for civilians, so also fixes falling back units, which apparently use this ability too.
  • Loading branch information
Tedster59 committed Aug 22, 2023
1 parent c0d3e71 commit a543cc1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions X2WOTCCommunityHighlander/Config/XComGame.ini
Original file line number Diff line number Diff line change
Expand Up @@ -273,3 +273,6 @@ bEnableVersionDisplay=true
; Uncomment the following line to disable the civilian pre-move yell mechanic
; bDisableCivilianPreMoveYell = true

;;; HL-Docs: ref:YellRedAlert
; Uncomment the following line to disable the yell ability applying a multitarget Red Alert effect to surrounding units.
; bDisableYellRedAlert = true
3 changes: 2 additions & 1 deletion X2WOTCCommunityHighlander/Src/XComGame/Classes/CHHelpers.uc
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,9 @@ var config float ProjectileParticleSystemExpirationDefaultOverride;
// Variable for Issue #817 - put the string here, as UIOptionsPCScreen is native and cannot have new variables.
var localized string m_strFramerateSmoothingDisabledReason;

// Variable added Issue #717 - allow disabling the civilian pre-move yell
// Variables added Issue #717 - allow disabling the civilian pre-move yell
var config bool bDisableCivilianPreMoveYell;
var config bool bDisableYellRedAlert;

// Start Issue #885
enum EHLDelegateReturn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,10 @@ static function X2AbilityTemplate AddYellAbility()
Template.AbilityToHitCalc = ChanceToActivate;

//Effect on a successful test is adding the red alert persistent effect to the unit
AddRedAlertEffects(Template, true);

/// HL-Docs: feature:YellRedAlert; issue:717; tags:
/// Add config option to the "Yell" ability applying a RedAlert effect to nearby units.
AddRedAlertEffects(Template, !(class'CHHelpers'.default.bDisableYellRedAlert));

//Trigger on player input.
InputTrigger = new class'X2AbilityTrigger_PlayerInput';
Expand Down

0 comments on commit a543cc1

Please sign in to comment.