diff --git a/addons/rearm/CfgVehicles.hpp b/addons/rearm/CfgVehicles.hpp index cfe0bfb289..53ca73cc63 100644 --- a/addons/rearm/CfgVehicles.hpp +++ b/addons/rearm/CfgVehicles.hpp @@ -4,8 +4,8 @@ class GVAR(Rearm) { \ displayName = CSTRING(Rearm); \ distance = REARM_ACTION_DISTANCE; \ - condition = QUOTE([ARR_2(_player,_target)] call FUNC(canRearm)); \ - statement = QUOTE([ARR_2(_player,_target)] call FUNC(rearm)); \ + condition = QUOTE(_this call FUNC(canRearm)); \ + statement = QUOTE(_player call FUNC(rearm)); \ exceptions[] = {"isNotInside"}; \ icon = PATHTOF(ui\icon_rearm_interact.paa); \ }; \ @@ -18,8 +18,8 @@ class GVAR(PickUpAmmo) { \ displayName = CSTRING(PickUpAmmo); \ distance = REARM_ACTION_DISTANCE; \ - condition = QUOTE([ARR_2(_player,_target)] call FUNC(canPickUpAmmo)); \ - insertChildren = QUOTE([_target] call FUNC(addRearmActions)); \ + condition = QUOTE(_this call FUNC(canPickUpAmmo)); \ + insertChildren = QUOTE(_target call FUNC(addRearmActions)); \ exceptions[] = {"isNotInside"}; \ icon = PATHTOF(ui\icon_rearm_interact.paa); \ }; \ diff --git a/addons/rearm/functions/fnc_canPickUpAmmo.sqf b/addons/rearm/functions/fnc_canPickUpAmmo.sqf index a6855de756..8ae3cdd993 100644 --- a/addons/rearm/functions/fnc_canPickUpAmmo.sqf +++ b/addons/rearm/functions/fnc_canPickUpAmmo.sqf @@ -3,8 +3,8 @@ * Check if a unit can pick up ammo. * * Arguments: - * 0: Unit - * 1: Target + * 0: Target + * 1: Unit * * Return Value: * Can Pick Up Ammo @@ -16,6 +16,6 @@ */ #include "script_component.hpp" -params ["_unit", "_target"]; +params ["_target", "_unit"]; !(isNull _unit || {!(_unit isKindOf "CAManBase")} || {!local _unit} || {(_target distance _unit) > REARM_ACTION_DISTANCE}) diff --git a/addons/rearm/functions/fnc_canRearm.sqf b/addons/rearm/functions/fnc_canRearm.sqf index e80fb3a940..feb29eda01 100644 --- a/addons/rearm/functions/fnc_canRearm.sqf +++ b/addons/rearm/functions/fnc_canRearm.sqf @@ -3,8 +3,8 @@ * Check if a unit can rearm. * * Arguments: - * 0: Unit - * 1: Target + * 0: Target + * 1: Unit * * Return Value: * Can Rearm @@ -17,7 +17,7 @@ #include "script_component.hpp" private ["_magazineClass", "_magazines", "_turretPath"]; -params ["_unit", "_target"]; +params ["_target", "_unit"]; if (GVAR(level) == 0 || {isNull _unit} || {!(_unit isKindOf "CAManBase")} || {!local _unit} || {_target distance _unit > REARM_ACTION_DISTANCE}) exitWith {false}; diff --git a/addons/rearm/functions/fnc_pickUpAmmo.sqf b/addons/rearm/functions/fnc_pickUpAmmo.sqf index 4861486b2d..3a479c1f8e 100644 --- a/addons/rearm/functions/fnc_pickUpAmmo.sqf +++ b/addons/rearm/functions/fnc_pickUpAmmo.sqf @@ -34,7 +34,7 @@ if (_tmpCal > 0) then { if (_tmpCal > 0) then { _cal = _tmpCal; } else { - diag_log format ["ACE_Rearm: Undefined Ammo [%1 : %2]", _ammo, inheritsFrom (configFile >> "CfgAmmo" >> _ammo)]; + diag_log format ["[ACE] ERROR: Undefined Ammo [%1 : %2]", _ammo, inheritsFrom (configFile >> "CfgAmmo" >> _ammo)]; if (_ammo isKindOf "BulletBase") then { _cal = 8; } else { diff --git a/addons/rearm/functions/fnc_rearm.sqf b/addons/rearm/functions/fnc_rearm.sqf index bb5d112a5d..c216b606f6 100644 --- a/addons/rearm/functions/fnc_rearm.sqf +++ b/addons/rearm/functions/fnc_rearm.sqf @@ -4,7 +4,6 @@ * * Arguments: * 0: Unit - * 1: Vehicle * * Return Value: * None @@ -17,7 +16,7 @@ #include "script_component.hpp" private ["_magazineClass", "_ammo", "_tmpCal", "_cal", "_idx", "_needRearmMags", "_magazineDisplayName"]; -params ["_unit", "_vehicle"]; +params ["_unit"]; _magazineClass = _unit getVariable QGVAR(carriedMagazine); if (isNil "_magazineClass") exitWith {false};