Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
releases/*
keys/*
*.biprivatekey
.hemttprivatekey
.hemttout
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Changelog for AIMEE 7.2.2026

1.3.10.0
- Added search light interactions to ground vehicles.
- Added 4 copilot-related controls: 'Take Controls', 'Release Controls', 'Lock Controls' and 'Unlock Controls'.

# Changelog for AIMEE 27.9.2025

1.3.9.0
Expand Down
3 changes: 0 additions & 3 deletions addons/change_ammo/addon.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@ enabled = true

[binarize]
enabled = true

[asc]
enabled = true
12 changes: 2 additions & 10 deletions addons/change_ammo/functions/fnc_loadMagazine.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* None
*
* Example:
* [vehicle player, vehicle player, [_weapon, _muzzle, _magazine, _turret]] call AIMEE_change_ammo_fnc_loadMagazine
* [vehicle player, vehicle player, [currentWeapon vehicle player, currentMuzzle vehicle player, currentMagazine vehicle player, vehicle player unitTurret player]] call AIMEE_change_ammo_fnc_loadMagazine
*
* Public: No
*/
Expand All @@ -27,16 +27,8 @@ _args params ["_weapon", "_muzzle", "_magazine", "_turret"];
// Don't change mags for currently unselected weapons
if (((weaponState [_target, _turret]) select 1) != _muzzle) exitWith {};

private _magazinesAllTurrets = [];

// Get magazines that are of the correct type; Exclude empty mags
{
_x params ["_xMag", "_xTurret", "_xAmmo"];

if ((_xMag == _magazine) && {_xTurret isEqualTo _turret} && {_xAmmo > 0}) then {
_magazinesAllTurrets pushBack _x;
};
} forEach (magazinesAllTurrets _target);
private _magazinesAllTurrets = (magazinesAllTurrets _target) select {_x params ["_xMag", "_xTurret", "_xAmmo"]; (_xMag == _magazine) && {_xTurret isEqualTo _turret} && {_xAmmo > 0}};

// Get count of rounds in magazines, then select maximum
private _magazinesCount = _magazinesAllTurrets apply {_x select 2};
Expand Down
50 changes: 28 additions & 22 deletions addons/change_ammo/functions/fnc_magazinesUnitMenus.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,26 @@
* 0: Unit <OBJECT>
*
* Return Value:
* Modified interaction menu <ARRAY>
* Interaction menu <ARRAY>
*
* Example:
* player call AIMEE_change_ammo_fnc_magazinesUnitMenus
*
* Public: No
*/

(weaponState _this) params ["_weapon", "_muzzle", "", "_magazine"];
params ["_unit"];

(weaponState _unit) params ["_weapon", "_muzzle", "", "_magazine"];

// Returns case correct magazines
private _magazines = (magazines [_this, false]) call CBA_fnc_getArrayElements;
private _magazines = (magazines [_unit, false]) call CBA_fnc_getArrayElements;

if (_magazines isEqualTo []) exitWith {[]};
if (_magazines isEqualTo []) exitWith {
[] // return
};

private _compatibleMagazines = compatibleMagazines [_weapon, _muzzle] - [_magazine];
private _compatibleMagazines = (compatibleMagazines [_weapon, _muzzle]) - [_magazine];
private _class = "";
private _config = configNull;
private _cfgMagazines = configFile >> "CfgMagazines";
Expand All @@ -32,23 +36,25 @@ for "_i" from 0 to (count _magazines) - 2 step 2 do {
_class = _magazines select _i;

// Find compatible magazines
if (_class in _compatibleMagazines) then {
_config = _cfgMagazines >> _class;

_menus pushBack [
[
format [QGVAR(magazine_%1), _class], // Action name
format [GVAR(numMagazines), getText (_config >> "displayName"), _magazines select (_i + 1)], // Name of action shown in menu
getText (_config >> "picture"), // Icon
{_player reload (_this select 2)}, // Statement
{true}, // Condition
nil,
[_muzzle, _class] // Action parameters
] call ace_interact_menu_fnc_createAction,
[],
_this
];
if !(_class in _compatibleMagazines) then {
continue;
};

_config = _cfgMagazines >> _class;

_menus pushBack [
[
format [QGVAR(magazine_%1), _class], // Action name
format [GVAR(numMagazines), getText (_config >> "displayName"), _magazines select (_i + 1)], // Name of action shown in menu
getText (_config >> "picture"), // Icon
{_player reload (_this select 2)}, // Statement
{true}, // Condition
nil,
[_muzzle, _class] // Action parameters
] call ace_interact_menu_fnc_createAction,
[],
_unit
];
};

_menus
_menus // return
59 changes: 34 additions & 25 deletions addons/change_ammo/functions/fnc_magazinesVehicleMenus.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* 1: Vehicle <OBJECT>
*
* Return Value:
* Modified interaction menu <ARRAY>
* Interaction menu <ARRAY>
*
* Example:
* [player, vehicle player] call AIMEE_change_ammo_fnc_magazinesVehicleMenus
Expand All @@ -19,40 +19,49 @@
params ["_unit", "_target"];

private _turret = _target unitTurret _unit;
(weaponState [_target, _turret]) params ["_weapon", "_muzzle", "", "_magazine"];

// Do not allow menu creation for vanilla autocannons that use different firemodes to switch ammunition types instead of magazines
if (_weapon in ["autocannon_40mm_CTWS", "autocannon_30mm_CTWS", "autocannon_30mm", "ACE_cannon_20mm_Rh202"]) exitWith {[]};
if (_turret isEqualTo []) exitWith {
[] // return
};

(weaponState [_target, _turret]) params ["_weapon", "_muzzle", "", "_magazine"];

// Returns case correct magazines
private _allAvailableMags = (_target magazinesTurret [_turret, false]) call CBA_fnc_getArrayElements;
private _compatibleMags = compatibleMagazines [_weapon, _muzzle] - [_magazine];
private _magazines = (_target magazinesTurret [_turret, false]) call CBA_fnc_getArrayElements;

if (_magazines isEqualTo []) exitWith {
[] // return
};

private _compatibleMags = (compatibleMagazines [_weapon, _muzzle]) - [_magazine];
private _menus = [];
private _class = "";
private _config = "";
private _cfgMagazines = configFile >> "CfgMagazines";

for "_i" from 0 to (count _allAvailableMags) - 2 step 2 do {
_class = _allAvailableMags select _i;
for "_i" from 0 to (count _magazines) - 2 step 2 do {
_class = _magazines select _i;

// Find compatible magazines
if (_class in _compatibleMags) then {
_config = _cfgMagazines >> _class;

_menus pushBack [
[
format [QGVAR(magazineVehicle_%1), _class], // Action name
getText (_config >> "displayName"), // Name of action shown in menu
getText (_config >> "picture"), // Icon
{[_player, _target, _this select 2] call FUNC(loadMagazine)}, // Statement
{true}, // Condition
nil,
[_weapon, _muzzle, _class, _turret] // Action parameters
] call ace_interact_menu_fnc_createAction,
[],
_target
];
if !(_class in _compatibleMags) then {
continue;
};

_config = _cfgMagazines >> _class;

_menus pushBack [
[
format [QGVAR(magazineVehicle_%1), _class], // Action name
getText (_config >> "displayName"), // Name of action shown in menu
getText (_config >> "picture"), // Icon
{[_player, _target, _this select 2] call FUNC(loadMagazine)}, // Statement
{true}, // Condition
nil,
[_weapon, _muzzle, _class, _turret] // Action parameters
] call ace_interact_menu_fnc_createAction,
[],
_target
];
};

_menus
_menus // return
2 changes: 1 addition & 1 deletion addons/change_ammo/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define DEBUG_SYNCHRONOUS
#define DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS

#ifdef DEBUG_ENABLED_AIMEE_CHANGE_AMMO
Expand Down
3 changes: 0 additions & 3 deletions addons/group/addon.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@ enabled = true

[binarize]
enabled = true

[asc]
enabled = true
2 changes: 1 addition & 1 deletion addons/group/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define DEBUG_SYNCHRONOUS
#define DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS

#ifdef DEBUG_ENABLED_AIMEE_GROUP
Expand Down
1 change: 0 additions & 1 deletion addons/inventory/XEH_PREP.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
PREP(assemble);
PREP(assembleModify);
PREP(backpackPos);
PREP(backpackType);
PREP(backpackUAVModify);
PREP(canAssemble);
PREP(canDisassemble);
Expand Down
3 changes: 0 additions & 3 deletions addons/inventory/addon.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@ enabled = true

[binarize]
enabled = true

[asc]
enabled = true
6 changes: 4 additions & 2 deletions addons/inventory/functions/fnc_UAVAssemble.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* None
*
* Example:
* player call AIMEE_uav_terminal_fnc_UAVAssemble
* player call AIMEE_inventory_fnc_UAVAssemble
*
* Public: No
*/
Expand All @@ -26,6 +26,8 @@ _unit playAction "PutDown";
[{
params ["_unit"];

if (!alive _unit) exitWith {};

// Check if backpack hasn't changed
private _UAVType = _unit call FUNC(UAVType);

Expand All @@ -38,7 +40,7 @@ _unit playAction "PutDown";

// Find position to place UAV
private _direction = getDir _unit;
private _position = (getPosASL _unit) vectorAdd [0.8 * sin(_direction), 0.8 * cos(_direction), 0];
private _position = (getPosASL _unit) vectorAdd [sin _direction, cos _direction, 0] vectorMultiply 0.8;
private _intersection = (lineIntersectsSurfaces [_position vectorAdd [0, 0, 1.5], _position vectorDiff [0, 0, 1.5], _unit, objNull, true, 1, "GEOM", "FIRE"]) param [0, []];

private _vectorUp = if (_intersection isNotEqualTo []) then {
Expand Down
16 changes: 11 additions & 5 deletions addons/inventory/functions/fnc_UAVType.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,24 @@
* Returns what type of UAV can be assembled from backpack <STRING>
*
* Example:
* player call AIMEE_uav_terminal_fnc_UAVType
* player call AIMEE_inventory_fnc_UAVType
*
* Public: No
*/

private _backpack = backpackContainer _this;
params ["_unit"];

if (isNull _backpack) exitWith {""};
private _backpack = backpackContainer _unit;

if (isNull _backpack) exitWith {
"" // return
};

private _config = configOf _backpack >> "assembleInfo";

// Ignore static weapons
if (isNull _config || {isArray (_config >> "base")}) exitWith {""};
if (isNull _config || {isArray (_config >> "base")}) exitWith {
"" // return
};

getText (_config >> "assembleTo")
getText (_config >> "assembleTo") // return
12 changes: 7 additions & 5 deletions addons/inventory/functions/fnc_assemble.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,25 @@
* Public: No
*/

(call FUNC(locateBackpack)) params ["_base", "_weapon", "_weaponHolder", "_baseOnGround"];
params ["_unit"];

(_unit call FUNC(locateBackpack)) params ["_base", "_weapon", "_weaponHolder", "_baseOnGround"];

// If the base is on the ground, switch it with the weapon on the player's back
if (_baseOnGround) then {
_weapon = backpackContainer _this;
_weapon = backpackContainer _unit;

// Add base to player, which will automatically drop bag
_this addBackpack (typeOf _base);
_unit addBackpack (typeOf _base);

// Delete weapon in weaponholder
deleteVehicle _weaponHolder;

// Look for switched backpacks in next frame and assemble then
[{
(_this select 0) action ["Assemble", _this select 1];
}, [_this, _weapon]] call CBA_fnc_execNextFrame;
}, [_unit, _weapon]] call CBA_fnc_execNextFrame;
} else {
// If tripod on back (weapon on ground)
_this action ["Assemble", _weapon];
_unit action ["Assemble", _weapon];
};
6 changes: 3 additions & 3 deletions addons/inventory/functions/fnc_assembleModify.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
* Sets the name of the interaction.
*
* Arguments:
* 0: Object <OBJECT>
* 0: Object (not used) <OBJECT>
* 1: Unit <OBJECT>
* 2: Params <ARRAY>
* 2: Params (not used) <ARRAY>
* 3: Interaction menu <ARRAY>
*
* Return Value:
* Modified interaction menu <ARRAY>
* None
*
* Public: No
*/
Expand Down
6 changes: 4 additions & 2 deletions addons/inventory/functions/fnc_backpackPos.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@
* Public: No
*/

private _spine = _this selectionPosition "spine3";
(((_this selectionPosition "rightshoulder" vectorDiff _spine) vectorCrossProduct (_this selectionPosition "leftshoulder" vectorDiff _spine)) vectorMultiply 4) vectorAdd _spine;
params ["_unit"];

private _spine = _unit selectionPosition "spine3";
(((_unit selectionPosition "rightshoulder" vectorDiff _spine) vectorCrossProduct (_unit selectionPosition "leftshoulder" vectorDiff _spine)) vectorMultiply 4) vectorAdd _spine // return
24 changes: 0 additions & 24 deletions addons/inventory/functions/fnc_backpackType.sqf

This file was deleted.

Loading
Loading