mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Cargo - CanLoadItem ignores vehicle height on scripted load (#6629)
This commit is contained in:
parent
e54e8d0f8c
commit
9eba55be21
@ -6,7 +6,7 @@
|
|||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Item <OBJECT or STRING>
|
* 0: Item <OBJECT or STRING>
|
||||||
* 1: Holder Object (Vehicle) <OBJECT>
|
* 1: Holder Object (Vehicle) <OBJECT>
|
||||||
* 2: Ignore interaction distance <BOOL>
|
* 2: Ignore interaction distance and stability checks <BOOL>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* Can load in <BOOL>
|
* Can load in <BOOL>
|
||||||
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
params [["_item", "", [objNull,""]], "_vehicle", ["_ignoreInteraction", false]];
|
params [["_item", "", [objNull,""]], "_vehicle", ["_ignoreInteraction", false]];
|
||||||
|
|
||||||
if (speed _vehicle > 1 || {((getPos _vehicle) select 2) > 3}) exitWith {TRACE_1("vehicle not stable",_vehicle); false};
|
if ((!_ignoreInteraction) && {speed _vehicle > 1 || {((getPos _vehicle) select 2) > 3}}) exitWith {TRACE_1("vehicle not stable",_vehicle); false};
|
||||||
|
|
||||||
if (_item isEqualType objNull && {{alive _x && {getText (configFile >> "CfgVehicles" >> typeOf _x >> "simulation") != "UAVPilot"}} count crew _item > 0}) exitWith {
|
if (_item isEqualType objNull && {{alive _x && {getText (configFile >> "CfgVehicles" >> typeOf _x >> "simulation") != "UAVPilot"}} count crew _item > 0}) exitWith {
|
||||||
TRACE_1("item is occupied",_item);
|
TRACE_1("item is occupied",_item);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Item <OBJECT or STRING>
|
* 0: Item <OBJECT or STRING>
|
||||||
* 1: Vehicle <OBJECT>
|
* 1: Vehicle <OBJECT>
|
||||||
* 2: Ignore interaction distance <BOOL>
|
* 2: Ignore interaction distance and stability checks <BOOL>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* Object loaded <BOOL>
|
* Object loaded <BOOL>
|
||||||
|
@ -43,7 +43,7 @@ if (!alive _cargo) exitWith {
|
|||||||
params ["_successful", "_cargo", "_mousePosASL"];
|
params ["_successful", "_cargo", "_mousePosASL"];
|
||||||
if (!_successful) exitWith {};
|
if (!_successful) exitWith {};
|
||||||
|
|
||||||
private _holder = (nearestObjects [ASLToAGL _mousePosASL, EGVAR(cargo,cargoHolderTypes), 5]) param [0, objNull];
|
private _holder = (nearestObjects [ASLToAGL _mousePosASL, EGVAR(cargo,cargoHolderTypes), 5, true]) param [0, objNull]; // 2d distance search
|
||||||
if (isNull _holder) exitWith {
|
if (isNull _holder) exitWith {
|
||||||
[LSTRING(NothingSelected)] call FUNC(showMessage);
|
[LSTRING(NothingSelected)] call FUNC(showMessage);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user