mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Disable rearm,refuel on dead vehicles (#5158)
This commit is contained in:
parent
0cdb2ce238
commit
f69148bdc0
@ -19,6 +19,8 @@
|
||||
private ["_dummy","_magazineClass"];
|
||||
params [["_target", objNull, [objNull]], ["_unit", objNull, [objNull]]];
|
||||
|
||||
if (!alive _target) exitWith {false};
|
||||
|
||||
if (GVAR(level) == 0 || {isNull _unit} || {!(_unit isKindOf "CAManBase")} || {!local _unit} || {([_unit, _target] call EFUNC(interaction,getInteractionDistance)) > REARM_ACTION_DISTANCE} || {_target getVariable [QGVAR(disabled), false]}) exitWith {false};
|
||||
|
||||
_dummy = _unit getVariable [QGVAR(dummy), objNull];
|
||||
|
@ -19,6 +19,7 @@
|
||||
params [["_target", objNull, [objNull]], ["_unit", objNull, [objNull]]];
|
||||
|
||||
!(isNull _unit ||
|
||||
{!alive _target} ||
|
||||
{!(_unit isKindOf "CAManBase")} ||
|
||||
{!local _unit} ||
|
||||
{(_target distance _unit) > REARM_ACTION_DISTANCE} ||
|
||||
|
@ -19,6 +19,7 @@
|
||||
params [["_target", objNull, [objNull]], ["_unit", objNull, [objNull]]];
|
||||
|
||||
!(isNull _unit ||
|
||||
{!alive _target} ||
|
||||
{!(_unit isKindOf "CAManBase")} ||
|
||||
{!local _unit} ||
|
||||
{(_target distance _unit) > REARM_ACTION_DISTANCE} ||
|
||||
|
@ -5,7 +5,7 @@
|
||||
class GVAR(Refuel) { \
|
||||
displayName = CSTRING(Refuel); \
|
||||
distance = REFUEL_ACTION_DISTANCE; \
|
||||
condition = "true"; \
|
||||
condition = "alive _target"; \
|
||||
statement = ""; \
|
||||
showDisabled = 0; \
|
||||
priority = 2; \
|
||||
|
@ -26,6 +26,7 @@ if (_target isKindOf "AllVehicles") then {
|
||||
};
|
||||
|
||||
!(isNull _nozzle ||
|
||||
{!alive _target} ||
|
||||
{_engine} ||
|
||||
{([_unit, _target] call EFUNC(interaction,getInteractionDistance)) > REFUEL_ACTION_DISTANCE} ||
|
||||
{!isNull (_target getVariable [QGVAR(nozzle), objNull])})
|
||||
|
@ -28,7 +28,7 @@
|
||||
class EGVAR(refuel,Refuel) { \
|
||||
displayName = ECSTRING(refuel,Refuel); \
|
||||
distance = 7; \
|
||||
condition = "true"; \
|
||||
condition = "alive _target"; \
|
||||
statement = ""; \
|
||||
showDisabled = 0; \
|
||||
priority = 2; \
|
||||
|
@ -41,7 +41,7 @@
|
||||
class EGVAR(refuel,Refuel) { \
|
||||
displayName = ECSTRING(refuel,Refuel); \
|
||||
distance = 7; \
|
||||
condition = "true"; \
|
||||
condition = "alive _target"; \
|
||||
statement = ""; \
|
||||
showDisabled = 0; \
|
||||
priority = 2; \
|
||||
|
Loading…
Reference in New Issue
Block a user