Skip to content

Commit

Permalink
update extension check (#5899)
Browse files Browse the repository at this point in the history
  • Loading branch information
commy2 authored and PabstMirror committed Dec 20, 2017
1 parent d7dca3d commit 250ec8a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
12 changes: 11 additions & 1 deletion addons/common/functions/fnc_checkFiles.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,17 @@ if (toLower (productVersion select 6) in ["linux", "osx"]) then {
private _versionEx = _x callExtension "version";

if (_versionEx == "") then {
private _errorMsg = format ["Extension %1.dll not installed.", _x];
private _extension = ".dll";

if (productVersion select 7 == "x64") then {
_extension = "_x64.dll";
};

if (productVersion select 6 == "Linux") then {
_extension = ".so";
};

private _errorMsg = format ["Extension %1%2 not found.", _x, _extension];

ERROR(_errorMsg);

Expand Down
2 changes: 0 additions & 2 deletions addons/medical/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ GVAR(injuredUnitCollection) = [];

private _versionEx = "ace_medical" callExtension "version";
DFUNC(handleDamage_assignWounds) = if (_versionEx == "") then {
INFO_1("Extension %1.dll not installed.","ace_medical");
DFUNC(handleDamage_woundsOld)
} else {
INFO_2("Extension version: %1: %2","ace_medical",_versionEx);
DFUNC(handleDamage_wounds)
};

Expand Down
4 changes: 4 additions & 0 deletions addons/medical/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,7 @@ class ACE_newEvents {
actionCheckBloodPressureLocal = QGVAR(actionCheckBloodPressureLocal);
addVitalLoop = QGVAR(addVitalLoop);
};

class ACE_Extensions {
extensions[] += {"ace_medical"};
};

0 comments on commit 250ec8a

Please sign in to comment.