mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fixed/improved checks
This commit is contained in:
parent
04238fd382
commit
4a5f056d71
@ -28,15 +28,14 @@ if ((_unit getHitPointDamage "HitLegs") >= 0.5) exitWith {false};
|
|||||||
|
|
||||||
// Static weapons need to be empty for carrying (ignore UAV AI)
|
// Static weapons need to be empty for carrying (ignore UAV AI)
|
||||||
if (_target isKindOf "StaticWeapon") exitWith {
|
if (_target isKindOf "StaticWeapon") exitWith {
|
||||||
(crew _target) findIf {getText (configOf _x >> "simulation") != "UAVPilot"} == -1
|
(crew _target) findIf {!unitIsUAV _x} == -1
|
||||||
};
|
};
|
||||||
|
|
||||||
// Units need to be unconscious or limping; Units also need to not be in ragdoll, as that causes desync issues
|
// Units need to be unconscious or limping; Units also need to not be in ragdoll, as that causes desync issues
|
||||||
if (_target isKindOf "CAManBase") exitWith {
|
if (_target isKindOf "CAManBase") exitWith {
|
||||||
isAwake _target && // not ragdolled
|
(isAwake _target != alive _target) && // not ragdolled
|
||||||
{lifeState _target == "INCAPACITATED" ||
|
{!(lifeState _target in ["HEALTHY", "INJURED"]) ||
|
||||||
{_target getHitPointDamage "HitLegs" >= 0.5} ||
|
{_target getHitPointDamage "HitLegs" >= 0.5}}
|
||||||
{(animationState _target) in ["", "unconscious", "deadstate"]}}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Check max items for WeaponHolders
|
// Check max items for WeaponHolders
|
||||||
|
@ -24,15 +24,14 @@ if !([_unit, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)) exi
|
|||||||
|
|
||||||
// Static weapons need to be empty for dragging (ignore UAV AI)
|
// Static weapons need to be empty for dragging (ignore UAV AI)
|
||||||
if (_target isKindOf "StaticWeapon") exitWith {
|
if (_target isKindOf "StaticWeapon") exitWith {
|
||||||
(crew _target) findIf {getText (configOf _x >> "simulation") != "UAVPilot"} == -1
|
(crew _target) findIf {!unitIsUAV _x} == -1
|
||||||
};
|
};
|
||||||
|
|
||||||
// Units need to be unconscious or limping; Units also need to not be in ragdoll, as that causes desync issues
|
// Units need to be unconscious or limping; Units also need to not be in ragdoll, as that causes desync issues
|
||||||
if (_target isKindOf "CAManBase") exitWith {
|
if (_target isKindOf "CAManBase") exitWith {
|
||||||
isAwake _target && // not ragdolled
|
(isAwake _target != alive _target) && // not ragdolled
|
||||||
{lifeState _target == "INCAPACITATED" ||
|
{!(lifeState _target in ["HEALTHY", "INJURED"]) ||
|
||||||
{_target getHitPointDamage "HitLegs" >= 0.5} ||
|
{_target getHitPointDamage "HitLegs" >= 0.5}}
|
||||||
{(animationState _target) in ["", "unconscious", "deadstate"]}}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Check max items for WeaponHolders
|
// Check max items for WeaponHolders
|
||||||
|
Loading…
Reference in New Issue
Block a user