Skip to content

General - Replace CBA_fnc_turretPath with unitTurret#11241

Merged
PabstMirror merged 1 commit intomasterfrom
general-replace-cba_fnc_turretpath
Jan 17, 2026
Merged

General - Replace CBA_fnc_turretPath with unitTurret#11241
PabstMirror merged 1 commit intomasterfrom
general-replace-cba_fnc_turretpath

Conversation

@johnb432
Copy link
Contributor

When merged this pull request will:

  • Title.
  • In most cases, this should both be a performance and safety improvement.

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

@johnb432 johnb432 added this to the 3.20.3 milestone Jan 15, 2026
@johnb432 johnb432 added the kind/optimization Release Notes: **IMPROVED:** label Jan 15, 2026
@johnb432
Copy link
Contributor Author

I wanted to also change it here, but I wasn't as sure about it:

&& {!((_unit call CBA_fnc_turretPath) in GVAR(vehicleExteriorTurrets))}

Definition of the array is here:

GVAR(vehicleExteriorTurrets) = getArray (_cfg >> QGVAR(vehicleExteriorTurrets));

ACE never defines any values, but the documentation says this:
https://ace3.acemod.org/wiki/framework/map-framework

I don't think this ever worked, given it's checking for a turret path within an array of numbers - or am I missing something?
I can fix it in another PR fi it's indeed broken, but I was also thinking of allowing -1 for the driver, as atm the map framework doesn't enable exclusion of the driver seat.

Thoughts?

@PabstMirror
Copy link
Contributor

I think we make most of the compat configs, so vehicleExteriorTurret is probably not being used anywhere
but I don't think it hurts to keep
maybe just update docs to

-ace_map_vehicleExteriorTurrets[] = {12,13};
+ace_map_vehicleExteriorTurrets[] = {{12},{13}};

which I'm pretty sure is what was intended

@Drofseh
Copy link
Contributor

Drofseh commented Jan 15, 2026

Here too I think

private _turretPath = [];
{
_x params ["_xUnit", "", "", "_xTurretPath"];
if (_unit == _xUnit) exitWith {_turretPath = _xTurretPath};
} forEach (fullCrew (vehicle _unit));
TRACE_1("turret Path",_turretPath);
if (_turretPath isEqualTo []) exitWith {};

@johnb432
Copy link
Contributor Author

Here too I think

private _turretPath = [];
{
_x params ["_xUnit", "", "", "_xTurretPath"];
if (_unit == _xUnit) exitWith {_turretPath = _xTurretPath};
} forEach (fullCrew (vehicle _unit));
TRACE_1("turret Path",_turretPath);
if (_turretPath isEqualTo []) exitWith {};

I'll make another PR to handle that.

@PabstMirror PabstMirror merged commit 61a82b8 into master Jan 17, 2026
3 checks passed
@PabstMirror PabstMirror deleted the general-replace-cba_fnc_turretpath branch January 17, 2026 03:14
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.

3 participants