Fix vehicle lock lockpick condition, Fix lockpicking from inside (#4985)

This commit is contained in:
jonpas 2017-03-12 05:49:54 +01:00 committed by PabstMirror
parent d313d53b02
commit 43dc1f020e

View File

@ -51,9 +51,11 @@ if (!([[_unit, _veh]] call _condition)) exitWith {false};
_returnValue = _funcType in ["canLockpick", "startLockpick", "finishLockpick"]; _returnValue = _funcType in ["canLockpick", "startLockpick", "finishLockpick"];
switch (_funcType) do { switch (_funcType) do {
case "canLockpick": {}; case "canLockpick": {
_returnValue = !([_unit, _veh] call FUNC(hasKeyForVehicle)) && {(locked _veh) in [2, 3]};
};
case "startLockpick": { case "startLockpick": {
[_vehLockpickStrenth, [_unit, _veh, "finishLockpick"], {(_this select 0) call FUNC(lockpick)}, {}, (localize LSTRING(Action_LockpickInUse)), _condition] call EFUNC(common,progressBar); [_vehLockpickStrenth, [_unit, _veh, "finishLockpick"], {(_this select 0) call FUNC(lockpick)}, {}, (localize LSTRING(Action_LockpickInUse)), _condition, ["isNotInside"]] call EFUNC(common,progressBar);
}; };
case "finishLockpick": { case "finishLockpick": {
[QGVAR(setVehicleLock), [_veh, false], [_veh]] call CBA_fnc_targetEvent; [QGVAR(setVehicleLock), [_veh, false], [_veh]] call CBA_fnc_targetEvent;