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

Common - Improve MarkerLocal #10437

Merged
merged 2 commits into from
Oct 21, 2024
Merged

Conversation

BrettMayson
Copy link
Member

When merged this pull request will:

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}.

@BrettMayson BrettMayson added ignore-changelog Release Notes: Excluded and removed ignore-changelog Release Notes: Excluded labels Oct 19, 2024
@BrettMayson BrettMayson changed the title Common - Use MarkerLocal Common - Improve MarkerLocal Oct 19, 2024
@LinkIsGrim LinkIsGrim added this to the 3.18.2 milestone Oct 19, 2024
@LinkIsGrim LinkIsGrim added the kind/optimization Release Notes: **IMPROVED:** label Oct 19, 2024
@johnb432
Copy link
Contributor

private _marker = createMarkerLocal [_markerNameStr, _object, _channel, _unit];
TRACE_2("created",_marker,_channel);
_marker setMarkerShapeLocal "RECTANGLE";
_marker setMarkerBrushLocal "SolidFull";
_marker setMarkerSizeLocal [(_maxWidth / 2),(_maxLength / 2)];
_marker setMarkerDirLocal _direction;
_marker setMarkerColor "ColorGrey";

We first create the marker locally and with the final command broadcast the changes. Shouldn't be apply the same logic here as well?

@BrettMayson BrettMayson requested a review from johnb432 October 19, 2024 23:45
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.

There still would be

private _mkrB = createMarker [format ["shotInfo-%1-%2",_shootPos,_lastPos], _lastPos];
_mkrB setMarkerType "mil_dot";
_mkrB setMarkerColor "ColorGreen";
_mkrB setMarkerSize [0.5,0.5];
private _diff = _lastPos vectorDiff _shootPos;
_mkrB setMarkerText format ["%1", _diff apply {round _x}];
private _dist2d = _shootPos distance2D _lastPos;
private _dir = _shootPos getDir _lastPos;
private _height = (_lastPos select 2) - (_shootPos select 2);
_mkrB setMarkerText format ["Dist: %1m Az: %2[%3] Height:%4", _dist2d toFixed 0, _dir toFixed 2, ((6400 / 360) * _dir) toFixed 0, _height toFixed 0];
}, [_proj, _shootPos, [0,0,0], _submunitionAmmo]] call CBA_fnc_waitUntilAndExecute;
private _mkrA = createMarker [format ["shotInfo-%1",_shootPos], _shootPos];
_mkrA setMarkerType "mil_dot";
_mkrA setMarkerColor "ColorRed";
_mkrA setMarkerSize [0.5,0.5];
but given that's a dev function, it doesn't matter much.

@PabstMirror PabstMirror merged commit 07a027d into acemod:master Oct 21, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/optimization Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants