-
Notifications
You must be signed in to change notification settings - Fork 68
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
Add option to send sound alerts data to allies #1169
Add option to send sound alerts data to allies #1169
Conversation
Allow option to override original function in OnABilityActivated to pass sound alerts from allies to other allies.
|
||
/// HL-Docs: ref:ConsiderAlliesforSoundAlerts | ||
// start issue #620 | ||
static function bool ConsiderAlliesforSoundAlerts() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there are a particular reason you created a function to check the value of a config variable?
You could just do class'CHHelpers'.default.bConsiderAlliesforSoundAlerts
wherever you need to check this.
But even if using a function, it can be simplified to:
static function bool ConsiderAlliesforSoundAlerts()
{
return default.bConsiderAlliesforSoundAlerts;
}
Also, your function has no return value for when default.bConsiderAlliesforSoundAlerts
is false
. It will still return false
as that is the default value for bool
values, but it's not a proper way to do things.
Using a bool variable now rather than a static function
Sorry I someone didn't copy the latest XComGame file and removed these comments in my latest commit.
@@ -32,13 +32,13 @@ bEnableVersionDisplay=true | |||
;;; HL-Docs: ref:ArmorEquipRollDLCPartChance | |||
;+CosmeticDLCNamesUnaffectedByRoll=MyDLCName | |||
|
|||
;;; HL-Docs: ref:DisableExtraLOSCheckForSmoke |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are these three lines concerning issue #669 doing here?
|
||
if( VSizeSq(vLoc - vCenter) < RadiiSumSquared ) | ||
{ | ||
OutEnemies.AddItem(kUnit.GetReference()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you're collecting units, not enemies, would make sense for the array to be called OutUnits rather than OutEnemies.
Please remove the unrelated changes to issue #669 HL-Docs from this PR. It's actually breaking the docs, btw. Other than that, should be good to go. |
remove lines not pertaining to this issue
For sake of making sense change original variable name since this was copied from another function
…dDoby/X2WOTCCommunityHighlander into ConsiderAlliesforSoundAlerts2
Closes #620
Allow option to override original function in
OnABilityActivated
to pass sound alerts from allies to other allies.