mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Dragging - Add limping check to carrier and improve limping check for target unit (#9251)
* fix limping damage threshold * add check for carrier not limping
This commit is contained in:
parent
8032ccacfc
commit
535662b883
@ -31,10 +31,10 @@ if (_target isKindOf "StaticWeapon") exitWith {
|
||||
crew _target findIf {getText (configOf _x >> "simulation") != "UAVPilot"} == -1
|
||||
};
|
||||
|
||||
// Units need to be unconscious or be limping
|
||||
// Units need to be unconscious or limping
|
||||
if (_target isKindOf "CAManBase") exitWith {
|
||||
lifeState _target isEqualTo "INCAPACITATED"
|
||||
|| {_target getHitPointDamage "HitLegs" > 0.4}
|
||||
|| {_target getHitPointDamage "HitLegs" >= 0.5}
|
||||
};
|
||||
|
||||
// Check max items for WeaponHolders
|
||||
|
@ -27,10 +27,10 @@ if (_target isKindOf "StaticWeapon") exitWith {
|
||||
crew _target findIf {getText (configOf _x >> "simulation") != "UAVPilot"} == -1
|
||||
};
|
||||
|
||||
// Units need to be unconscious or be limping
|
||||
// Units need to be unconscious or limping
|
||||
if (_target isKindOf "CAManBase") exitWith {
|
||||
lifeState _target isEqualTo "INCAPACITATED"
|
||||
|| {_target getHitPointDamage "HitLegs" > 0.4}
|
||||
|| {_target getHitPointDamage "HitLegs" >= 0.5}
|
||||
};
|
||||
|
||||
// Check max items for WeaponHolders
|
||||
|
@ -33,8 +33,8 @@ if !(_unit getVariable [QGVAR(isCarrying), false]) exitWith {
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
// drop if the crate is destroyed OR (target moved away from carrier (weapon disasembled))
|
||||
if (!alive _target || {_unit distance _target > 10}) exitWith {
|
||||
// drop if the crate is destroyed OR target moved away from carrier (weapon disassembled) OR carrier starts limping
|
||||
if !(alive _target && {_unit distance _target <= 10} && {_unit getHitPointDamage "HitLegs" < 0.5}) exitWith {
|
||||
TRACE_2("dead/distance",_unit,_target);
|
||||
if ((_unit distance _target > 10) && {(CBA_missionTime - _startTime) < 1}) exitWith {
|
||||
//attachTo seems to have some kind of network delay and target can return an odd position during the first few frames,
|
||||
|
Loading…
Reference in New Issue
Block a user