Medical - Skip distance check if in same vehicle (#6757)

* Medical - Skip distance check if in same vehicle

* Update addons/medical/functions/fnc_displayPatientInformation.sqf

Co-Authored-By: PabstMirror <pabstmirror@gmail.com>
This commit is contained in:
PabstMirror 2019-01-02 09:56:26 -06:00 committed by GitHub
parent da0ab4617a
commit f57d5ac180
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,7 @@ if (_show) then {
if (GVAR(displayPatientInformationTarget) != _target || GVAR(currentSelectedSelectionN) != _selectionN) exitwith {
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
if (ACE_player distance _target > MAX_DISTANCE) exitwith {
if ((ACE_player distance _target > MAX_DISTANCE) && {vehicle _target != vehicle ACE_player}) exitWith {
("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutText ["","PLAIN"];
[_idPFH] call CBA_fnc_removePerFrameHandler;
[QEGVAR(common,displayTextStructured), [[LSTRING(DistanceToFar), [_target] call EFUNC(common,getName)], 1.75, ACE_player], [ACE_player]] call CBA_fnc_targetEvent;