Skip to content

Commit

Permalink
Misc - Fix shared vehicle equipment "except self-treatment" setting (#…
Browse files Browse the repository at this point in the history
…361)

**When merged this pull request will:**
- Fix shared vehicle equipment "except self-treatment" setting not
allowing self-treatment in vehicle

### IMPORTANT

- [Development Guidelines](https://ace3.acemod.org/wiki/development/)
are read, understood and applied.
- Title of this PR uses our standard template `Component -
Add|Fix|Improve|Change|Make|Remove {changes}`.
  • Loading branch information
BlueTheKing authored Jul 4, 2023
1 parent fb2aa24 commit 825ad3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions addons/misc/functions/fnc_removeItemFromVehicle.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
* None
*
* Example:
* [player,"ACE_elasticBandage"] call kat_misc_fnc_removeItemFromVehicle
* [vehicle player, "kat_Painkiller", true] call kat_misc_fnc_removeItemFromVehicle
*
* Public: No
*/

params ["_vehicle","_item",["_isMagazine",false]];
params ["_vehicle", "_item", ["_isMagazine", false]];

if !(_isMagazine) then {
private _cargoItems = getItemCargo _vehicle;
Expand Down
3 changes: 2 additions & 1 deletion addons/misc/functions/fnc_useItem.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ if (GVAR(allowSharedVehicleEquipment) > 0 && _vehicleCondition) then {
};
case 3: { // Vehicle's equipment first (except self-treatment)
if(_medic isEqualTo _patient) then {
_useOrder = _sharedUseOrder + _vehicle;
_useOrder = _sharedUseOrder + [_vehicle];
_vehicleIndex = (count _useOrder) - 1;
} else {
_useOrder = ([_vehicle] + _sharedUseOrder);
_vehicleIndex = 0;
Expand Down

0 comments on commit 825ad3b

Please sign in to comment.