mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix facility is like vehicle (#6478)
This commit is contained in:
parent
d31f004ac2
commit
2d5892f285
@ -21,19 +21,22 @@ TRACE_1("params",_object);
|
||||
private _position = getPosASL _object;
|
||||
private _isInBuilding = false;
|
||||
|
||||
private _objects = (lineIntersectsWith [_object modelToWorldVisual [0, 0, (_position select 2)], _object modelToWorldVisual [0, 0, (_position select 2) +10], _object]);
|
||||
{
|
||||
if (_x getVariable ["ACE_isRepairFacility", getNumber (configFile >> "CfgVehicles" >> typeOf _x >> QGVAR(canRepair))] > 0) exitWith {
|
||||
private _checkObject = {
|
||||
if (
|
||||
_x getVariable ["ACE_isRepairFacility", getNumber (configFile >> "CfgVehicles" >> typeOf _x >> QGVAR(canRepair))] > 0
|
||||
&& {!(_x isKindOf "AllVehicles")} // check if it's not repair vehicle
|
||||
&& {alive _x}
|
||||
) exitWith {
|
||||
_isInBuilding = true;
|
||||
};
|
||||
} forEach _objects;
|
||||
|
||||
if (!_isInBuilding) then {
|
||||
_objects = position _object nearObjects 7.5;
|
||||
{
|
||||
if (_x getVariable ["ACE_isRepairFacility", getNumber (configFile >> "CfgVehicles" >> typeOf _x >> QGVAR(canRepair))] > 0) exitWith {
|
||||
_isInBuilding = true;
|
||||
};
|
||||
} forEach _objects;
|
||||
};
|
||||
_isInBuilding;
|
||||
|
||||
private _objects = (lineIntersectsWith [_object modelToWorldVisual [0, 0, (_position select 2)], _object modelToWorldVisual [0, 0, (_position select 2) +10], _object]);
|
||||
_checkObject forEach _objects;
|
||||
|
||||
if (_isInBuilding) exitWith {true};
|
||||
|
||||
_objects = position _object nearObjects 7.5;
|
||||
_checkObject forEach _objects;
|
||||
|
||||
_isInBuilding
|
||||
|
Loading…
Reference in New Issue
Block a user