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

Frag - Implement Arma v2.18 changes from #10157 #10313

Open
wants to merge 387 commits into
base: master
Choose a base branch
from

Conversation

lambdatiger
Copy link
Contributor

@lambdatiger lambdatiger commented Sep 12, 2024

This PR requires #10157 to be merged.
When merged this pull request will:

  • Use _instigator projectile "HitPart" event handler argument instead of retrieving shotParents.
  • Use new syntax of nearEntities to avoid needing to sort/filter the fragment target arrays.

IMPORTANT

  • If the contribution affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
  • Development Guidelines are read, understood and applied.
  • Title of this PR uses our standard template Component - Add|Fix|Improve|Change|Make|Remove {changes}.

lambdatiger and others added 30 commits January 15, 2024 18:44
Co-authored-by: johnb432 <[email protected]>
Co-authored-by: johnb432 <[email protected]>
Co-authored-by: johnb432 <[email protected]>
Co-authored-by: johnb432 <[email protected]>
Co-authored-by: johnb432 <[email protected]>
@lambdatiger lambdatiger marked this pull request as ready for review September 12, 2024 21:23
@PabstMirror
Copy link
Contributor

Readable diff (I think) - lambdatiger/ace_frag-overhaul@lambdatiger:ace_frag-overhaul:Event-hanlder-replacement...eventHandler-replace-2.18

@johnb432
Copy link
Contributor

@lambdatiger Can you handle the merge conflicts?

@johnb432 johnb432 added the kind/optimization Release Notes: **IMPROVED:** label Sep 22, 2024
@johnb432 johnb432 added this to the Ongoing milestone Sep 22, 2024
@johnb432 johnb432 added the 2.18 label Sep 22, 2024
@lambdatiger
Copy link
Contributor Author

There's one more 2.18 change that came from #10247 that isn't present in this PR yet. I'll test it again later this week before I commit it.

@johnb432
Copy link
Contributor

There's one more 2.18 change that came from #10247 that isn't present in this PR yet. I'll test it again later this week before I commit it.

There's no hurry, given that 2.18 won't release until sometime in october (and I doubt we will release a day 1 patch).

@johnb432
Copy link
Contributor

There's no hurry, given that 2.18 won't release until sometime in october (and I doubt we will release a day 1 patch).

That aged like milk...

@lambdatiger
Copy link
Contributor Author

I'll run through it tomorrow and let you know if it's good to go.

@lambdatiger
Copy link
Contributor Author

lambdatiger commented Oct 13, 2024

Alright, new feature isn't easily added. I'll address any other changes in #9728.

Testing seems to work like it should, no issues and the new nearEntities syntax does what it took us the command and a loop to do. If anyone has specific testing they want lmk, but I ran through in single player using the new syntax and formatting.

Copy link
Contributor

@johnb432 johnb432 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than that, LGTM

// Distribute evenly
private _sectorOffset = 360 * (_i - 1) / (_randomCount max 1);
private _randomDir = random (_sectorSize);
private _vectorDir = [cos (_sectorOffset + _randomDir), sin (_sectorOffset + _randomDir), sin (30 - (random 45))];

private _fragObjSpeed = _fragVelocity * (1 - random 0.5);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct indentation.

};

TRACE_1("total created",_fragCount);

END_COUNTER(frago);
_fragCount
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_fragCount
_fragCount // return


// compile possible targets including units, vehicles, and crews
private _targets = [_fragPosAGL, _fragRange, _fragRange, 0, false, _fragRange] nearEntities [["Car", "Motorcycle", "Tank", "StaticWeapon", "CAManBase", "Air", "Ship"], false, true, true];
if (_targets isEqualTo []) exitWith {
TRACE_2("No nearby targets",_fragPosAGL,_fragRange);
0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
0
0 // return

private _objects = _fragPosAGL nearEntities [["Car", "Motorcycle", "Tank", "StaticWeapon", "CAManBase", "Air", "Ship"], _fragRange];
if (_objects isEqualTo []) exitWith {

// compile possible targets including units, vehicles, and crews
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// compile possible targets including units, vehicles, and crews
// Compile possible targets including units, vehicles, and crews

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.18 kind/optimization Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants