diff --git a/addons/pharma/functions/fnc_getBloodVolumeChange.sqf b/addons/pharma/functions/fnc_getBloodVolumeChange.sqf index 0892d77b4..9966f8d78 100644 --- a/addons/pharma/functions/fnc_getBloodVolumeChange.sqf +++ b/addons/pharma/functions/fnc_getBloodVolumeChange.sqf @@ -22,16 +22,13 @@ params ["_unit", "_deltaT", "_syncValues"]; private _bloodLoss = [_unit] call ACEFUNC(medical_status,getBloodLoss); private _internalBleeding = GET_INTERNAL_BLEEDING(_unit); private _lossVolumeChange = (-_deltaT * ((_bloodLoss + _internalBleeding * (GET_HEART_RATE(_unit) / DEFAULT_HEART_RATE)) / GET_VASOCONSTRICTION(_unit))); +private _enableFluidShift = EGVAR(vitals,enableFluidShift); private _fluidVolume = GET_BODY_FLUID(_unit); -private _SRBCChange = 0; -_fluidVolume params ["_ECP","_ECB","_SRBC","_ISP","_fullVolume"]; +_fluidVolume params ["_ECB","_ECP","_SRBC","_ISP","_fullVolume"]; _ECP = _ECP + (_lossVolumeChange * LITERS_TO_ML) / 2; _ECB = _ECB + (_lossVolumeChange * LITERS_TO_ML) / 2; -_SRBCChange = if (_SRBC > 100 && _ECB < DEFAULT_ECB) then { ((DEFAULT_ECB - _ECB) min (abs ((_lossVolumeChange * LITERS_TO_ML)) / 2 + 1)) } else { 0 }; -_ECB = _ECB + _SRBCChange; - if (!isNil {_unit getVariable [QACEGVAR(medical,ivBags),[]]}) then { private _bloodBags = _unit getVariable [QACEGVAR(medical,ivBags), []]; private _IVarray = _unit getVariable [QGVAR(IV), [0,0,0,0,0,0]]; @@ -68,7 +65,16 @@ if (!isNil {_unit getVariable [QACEGVAR(medical,ivBags),[]]}) then { // Plasma adds to ECP. Saline splits between the ECP and ISP. Blood adds to ECB switch (true) do { case(_type == "Plasma"): { _ECP = _ECP + _bagChange; _lossVolumeChange = _lossVolumeChange + (_bagChange / ML_TO_LITERS); }; - case(_type == "Saline"): { _ECP = _ECP + _bagChange / 2; _ISP = _ISP + _bagChange / 2; _lossVolumeChange = _lossVolumeChange + (_bagChange / 2000); }; + case(_type == "Saline"): { + if (_enableFluidShift) then { + _ECP = _ECP + _bagChange / 2; + _ISP = _ISP + _bagChange / 2; + _lossVolumeChange = _lossVolumeChange + (_bagChange / 2000); + } else { + _ECP = _ECP + _bagChange; + _lossVolumeChange = _lossVolumeChange + (_bagChange / ML_TO_LITERS); + }; + }; case(_type == "Blood"): { _ECB = _ECB + _bagChange; _lossVolumeChange = _lossVolumeChange + (_bagChange / ML_TO_LITERS); }; }; }; @@ -88,7 +94,7 @@ if (!isNil {_unit getVariable [QACEGVAR(medical,ivBags),[]]}) then { _unit setVariable [QACEGVAR(medical,ivBags), _bloodBags, _syncValues]; }; - // Incoming fluids impacting internal temperature + // Incoming fluids impacting internal temperature if (_hypothermia) then { { _fluidHeat = _fluidHeat + _x; } forEach _incomingVolumeChange; @@ -102,27 +108,44 @@ if (!isNil {_unit getVariable [QACEGVAR(medical,ivBags),[]]}) then { }; }; -// Movement and recovery of interstital fluid -private _shiftValue = 0; -switch (true) do { - case (((_ECB + _ECP) > (_ISP * 0.6)) && ((_ECB + _ECP) > 4500)): { - // Negative shifts only happen above 4500ml of blood volume, to prevent issues with falling back into arrest/unconsciousness - _shiftValue = (2 min ((_ECP + _ECB) - (_ISP * 0.6))); - _ECP = _ECP - _shiftValue; - _ISP = _ISP + _shiftValue; - }; - case ((_ECB + _ECP) < (_ISP * 0.6)): { - _shiftValue = (2 min ((_ISP * 0.6) - (_ECP + _ECB))); - _ECP = _ECP + _shiftValue; - _ISP = _ISP - _shiftValue; +// Movement and recovery of interstital fluid and SRBC collection +private _SRBCChange = 0; + +if (_enableFluidShift) then { + private _shiftValue = 0; + private _defaultShift = false; + + _SRBCChange = [0, 0.5] select ((_SRBC > 0) && (_ECB < DEFAULT_ECB)); + _ECB = _ECB + (_SRBCChange * _deltaT); + _SRBC = _SRBC - (_SRBCChange * _deltaT); + + switch (true) do { + case (((_ECB + _ECP) > (_ISP * 0.6)) && ((_ECB + _ECP) > 4500)): { + // Negative shifts only happen above 4500ml of blood volume, to prevent patients from falling back into arrest/unconsciousness + _shiftValue = (1 min ((_ECP + _ECB) - (_ISP * 0.6))) * _deltaT; + + _ECP = _ECP - _shiftValue; + _ISP = _ISP + _shiftValue; + }; + case ((_ECB + _ECP) < (_ISP * 0.6)): { + _shiftValue = (1 min ((_ISP * 0.6) - (_ECP + _ECB))) *_deltaT; + + if (_shiftValue < 0.1) exitWith { _defaultShift = true; }; + + _ECP = _ECP + _shiftValue; + _ISP = _ISP - _shiftValue; + }; + default { + _defaultShift = true; + }; }; - default { - // If no shift is required, fluids begin returning to baseline in both ISP and SRBC volumes - _ISP = _ISP + ((DEFAULT_ISP - _ISP) min 2); - _SRBC = _SRBC + ((DEFAULT_SRBC - _SRBC) min 1); + + if (_defaultShift) then { + _ISP = _ISP + ((((DEFAULT_ISP - _ISP) max -2) min 2) *_deltaT); + _SRBC = _SRBC + ((((DEFAULT_SRBC - _SRBC) max -1) min 1) * _deltaT); }; }; -_unit setVariable [QEGVAR(circulation,bodyFluid), [_ECP, _ECB, (_SRBC - _SRBCChange), _ISP, (_ECP + _ECB)], _syncValues]; +_unit setVariable [QEGVAR(circulation,bodyFluid), [_ECB, _ECP, _SRBC, _ISP, (_ECP + _ECB)], _syncValues]; -((_lossVolumeChange + GET_BLOOD_VOLUME_LITERS(_unit)) max 0.01) \ No newline at end of file +((_lossVolumeChange + GET_BLOOD_VOLUME_LITERS(_unit)) max 0.01) diff --git a/addons/vitals/XEH_PREP.hpp b/addons/vitals/XEH_PREP.hpp index 5691dcbad..9295e7f53 100644 --- a/addons/vitals/XEH_PREP.hpp +++ b/addons/vitals/XEH_PREP.hpp @@ -1,4 +1,5 @@ PREP(addMedicationAdjustment); +PREP(fullHealLocal); PREP(handleUnitVitals); PREP(handleSimpleVitals); PREP(handleCardiacFunction); diff --git a/addons/vitals/XEH_postInit.sqf b/addons/vitals/XEH_postInit.sqf index b98c22217..784ed7295 100644 --- a/addons/vitals/XEH_postInit.sqf +++ b/addons/vitals/XEH_postInit.sqf @@ -1,3 +1,4 @@ #include "script_component.hpp" [QEGVAR(misc,handleRespawn), LINKFUNC(handleRespawn)] call CBA_fnc_addEventHandler; +[QACEGVAR(medical_treatment,fullHealLocalMod), LINKFUNC(fullHealLocal)] call CBA_fnc_addEventHandler; diff --git a/addons/vitals/XEH_preInit.sqf b/addons/vitals/XEH_preInit.sqf index 89a8639a1..68db2d5e4 100644 --- a/addons/vitals/XEH_preInit.sqf +++ b/addons/vitals/XEH_preInit.sqf @@ -9,7 +9,7 @@ PREP_RECOMPILE_END; #define CBA_SETTINGS_CAT "KAT - ADV Medical: Vitals" [ - QGVAR(simpleMedical), + QGVAR(enableSimpleMedical), "CHECKBOX", [LLSTRING(SIMPLEMED_ENABLE), LLSTRING(SIMPLEMED_ENABLE_DESC)], [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], @@ -17,4 +17,13 @@ PREP_RECOMPILE_END; true ] call CBA_Settings_fnc_init; +[ + QGVAR(enableFluidShift), + "CHECKBOX", + LLSTRING(FLUID_SHIFT), + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [true], + true +] call CBA_Settings_fnc_init; + ADDON = true; diff --git a/addons/vitals/functions/fnc_fullHealLocal.sqf b/addons/vitals/functions/fnc_fullHealLocal.sqf new file mode 100644 index 000000000..8b4cd8329 --- /dev/null +++ b/addons/vitals/functions/fnc_fullHealLocal.sqf @@ -0,0 +1,24 @@ +#include "..\script_component.hpp" +/* + * Author: MiszczuZPolski + * Local callback for fully healing a patient. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_vitals_fnc_fullHealLocal + * + * Public: No + */ + +params ["_patient"]; + +_patient setVariable [QGVAR(simpleMedical), false, true]; + +if (GVAR(enableSimpleMedical)) then { + _patient setVariable [QGVAR(simpleMedical), true, true]; +}; diff --git a/addons/vitals/functions/fnc_handleOxygenFunction.sqf b/addons/vitals/functions/fnc_handleOxygenFunction.sqf index f0e5cbc8d..dab0fab68 100644 --- a/addons/vitals/functions/fnc_handleOxygenFunction.sqf +++ b/addons/vitals/functions/fnc_handleOxygenFunction.sqf @@ -80,7 +80,9 @@ if (EGVAR(pharma,kidneyAction)) then { // Fractional Oxygen when breathing normal air is 0.21, 1 when breathing 100% Oxygen, and 0 when no air is being brought into the lungs private _fio2 = switch (true) do { - case ((_unit getVariable [QEGVAR(airway,occluded), false]) || (_unit getVariable [QEGVAR(airway,obstruction), false])): { 0 }; + case ((_unit getVariable [QEGVAR(airway,occluded), false]) || (_unit getVariable [QEGVAR(airway,obstruction), false])): { + [0, DEFAULT_FIO2] select ((_unit getVariable [QEGVAR(airway,recovery), false]) || (_unit getVariable [QEGVAR(airway,overstretch), false])) + }; case ((_unit getVariable [QEGVAR(chemical,airPoisoning), false]) || (_unit getVariable [QEGVAR(breathing,tensionpneumothorax), false]) || (_unit getVariable [QEGVAR(breathing,hemopneumothorax), false])): { 0 }; case (_unit getVariable [QEGVAR(breathing,oxygenTankConnected), false]): { 1 }; default { DEFAULT_FIO2 }; diff --git a/addons/vitals/functions/fnc_handleRespawn.sqf b/addons/vitals/functions/fnc_handleRespawn.sqf index 9b7280d2f..5647e0530 100644 --- a/addons/vitals/functions/fnc_handleRespawn.sqf +++ b/addons/vitals/functions/fnc_handleRespawn.sqf @@ -17,4 +17,8 @@ params ["_patient"]; -if (!(isPlayer _unit) && GVAR(simpleMedical)) then { _patient setVariable [QGVAR(simpleMedical), true, true] }; \ No newline at end of file +_patient setVariable [QGVAR(simpleMedical), false, true]; + +if (GVAR(enableSimpleMedical)) then { + _patient setVariable [QGVAR(simpleMedical), true, true]; +}; diff --git a/addons/vitals/functions/fnc_handleSimpleVitals.sqf b/addons/vitals/functions/fnc_handleSimpleVitals.sqf index 4903a9b14..ca3c9d8c4 100644 --- a/addons/vitals/functions/fnc_handleSimpleVitals.sqf +++ b/addons/vitals/functions/fnc_handleSimpleVitals.sqf @@ -72,7 +72,7 @@ if !(_adjustments isEqualTo []) then { private _heartRate = [_unit, _hrTargetAdjustment, _deltaT, _syncValues] call ACEFUNC(medical_vitals,updateHeartRate); //Rename [_unit, _painSupressAdjustment, _deltaT, _syncValues] call ACEFUNC(medical_vitals,updatePainSuppress); //Leave alone -private _bloodPressure = [120,80]; +private _bloodPressure = [80,120]; _unit setVariable [VAR_BLOOD_PRESS, _bloodPressure, _syncValues]; // Statements are ordered by most lethal first. diff --git a/addons/vitals/functions/fnc_handleUnitVitals.sqf b/addons/vitals/functions/fnc_handleUnitVitals.sqf index bc669d252..8c4002568 100644 --- a/addons/vitals/functions/fnc_handleUnitVitals.sqf +++ b/addons/vitals/functions/fnc_handleUnitVitals.sqf @@ -17,7 +17,7 @@ params ["_unit"]; -if (!(isPlayer _unit) && (_unit getVariable [QEGVAR(circulation,simpleMedical), false])) exitWith { [_unit] call FUNC(handleSimpleVitals) }; +if ((!(isPlayer _unit)) && (_unit getVariable [QGVAR(simpleMedical),false])) exitWith { [_unit] call FUNC(handleSimpleVitals); }; private _lastTimeUpdated = _unit getVariable [QACEGVAR(medical_vitals,lastTimeUpdated), 0]; private _deltaT = (CBA_missionTime - _lastTimeUpdated) min 10; @@ -147,18 +147,17 @@ _unit setVariable [VAR_BLOOD_PRESS, _bloodPressure, _syncValues]; _bloodPressure params ["_bloodPressureL", "_bloodPressureH"]; // Statements are ordered by most lethal first. -// Add SpO2 reactions to switch statement --------------------------------------------------------------------- - switch (true) do { - case (_spo2 < EGVAR(breathing,SpO2_dieValue) && EGVAR(breathing,SpO2_dieActive)): { +switch (true) do { + case ((_spo2 < EGVAR(breathing,SpO2_dieValue)) && EGVAR(breathing,SpO2_dieActive)): { TRACE_3("O2 Fatal",_unit,EGVAR(breathing,SpO2_dieValue),_spo2); - [QACEGVAR(medical,FatalInjury), _unit] call CBA_fnc_localEvent; + [QACEGVAR(common,setDead), _unit, "Fatal Blood Oxygen"] call CBA_fnc_localEvent; }; case (_bloodVolume < BLOOD_VOLUME_FATAL): { TRACE_3("BloodVolume Fatal",_unit,BLOOD_VOLUME_FATAL,_bloodVolume); [QACEGVAR(medical,Bleedout), _unit] call CBA_fnc_localEvent; }; case (IN_CRDC_ARRST(_unit)): {}; // if in cardiac arrest just break now to avoid throwing unneeded events - case (_spo2 < EGVAR(breathing,SpO2_cardiacValue) && EGVAR(breathing,SpO2_cardiacActive)): { + case ((_spo2 < EGVAR(breathing,SpO2_cardiacValue)) && EGVAR(breathing,SpO2_cardiacActive)): { [QACEGVAR(medical,FatalVitals), _unit] call CBA_fnc_localEvent; }; case (_hemorrhage == 4): { diff --git a/addons/vitals/functions/fnc_init.sqf b/addons/vitals/functions/fnc_init.sqf index 3679e66e3..117957058 100644 --- a/addons/vitals/functions/fnc_init.sqf +++ b/addons/vitals/functions/fnc_init.sqf @@ -17,4 +17,4 @@ params ["_patient"]; -if (!(isPlayer _unit) && GVAR(simpleMedical)) then { _patient setVariable [QGVAR(simpleMedical), true, true] }; \ No newline at end of file +[_patient] call FUNC(fullHealLocal); diff --git a/addons/vitals/stringtable.xml b/addons/vitals/stringtable.xml index bc823a806..559a77ae8 100644 --- a/addons/vitals/stringtable.xml +++ b/addons/vitals/stringtable.xml @@ -7,5 +7,8 @@ Activar Médico Simple para IA AI用単純化医療を有効化 + + Enable Patient Fluid Shift + diff --git a/addons/watch/RscTitles.hpp b/addons/watch/RscTitles.hpp index 6e57d6c6c..9d9806197 100644 --- a/addons/watch/RscTitles.hpp +++ b/addons/watch/RscTitles.hpp @@ -11,9 +11,24 @@ #define ST_CENTER 2 #define ST_RIGHT 1 +#define pixelW (1 / (getResolution select 2)) +#define pixelH (1 / (getResolution select 3)) +#define pixelScale 0.50 + +// pixel grids macros +#define UI_GRID_W (pixelW * pixelGridBase) +#define UI_GRID_H (pixelH * pixelGridBase) + +#define SAFEZONE_X_RIGHTEDGE ((safeZoneX - 1) * -1) +#define SAFEZONE_Y_LOWEDGE ((safeZoneY - 1) * -1) + +#define FRAME_W(N) ((UI_GRID_W * (N)) * (1.7777 / (getResolution select 4))) +#define FRAME_H(N) ((UI_GRID_H * (N))) + class RscText; class RscPicture; class RscButton; +class RscPictureKeepAspect; class RscTitles { class KAT_Katmin @@ -31,10 +46,10 @@ class RscTitles { idc = 19800; text = "\x\kat\addons\watch\UI\watch_katmin.paa"; - x = "0.0328437 * safezoneW + safezoneX"; - y = "0.652 * safezoneH + safezoneY"; - w = "0.225 * safezoneW"; - h = "0.4 * safezoneH"; + x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(15)); + y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(18.5)); + w = QUOTE(FRAME_W(25)); + h = QUOTE(FRAME_H(25)); }; class KatminIcon: KatminImage { @@ -71,13 +86,13 @@ class RscTitles shadow = 0; font = "PuristaBold"; text = "12:00"; //--- ToDo: Localize; - x = "0.104 * safezoneW + safezoneX"; - y = "0.8328 * safezoneH + safezoneY"; - w = "0.061875 * safezoneW"; - h = "0.033 * safezoneH"; + x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(7.5)); + y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(8.1)); + w = QUOTE(FRAME_W(7.5)); + h = QUOTE(FRAME_H(4)); colorBackground[] = {0,0,0,0}; colorText[] = {1,1,1,1}; - sizeEx = QUOTE(KAT_POS_H(2)); + sizeEx = QUOTE(FRAME_H(3.1)); }; class KatminMonth: RscText { @@ -87,13 +102,13 @@ class RscTitles shadow = 0; font = "PuristaBold"; text = "JAN"; //--- ToDo: Localize; - x = "0.157316 * safezoneW + safezoneX"; - y = "0.8394 * safezoneH + safezoneY"; - w = "0.0257812 * safezoneW"; - h = "0.013 * safezoneH"; + x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(0.8)); + y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(7.3)); + w = QUOTE(FRAME_W(2.5)); + h = QUOTE(FRAME_H(1.5)); colorBackground[] = {0,0,0,0}; colorText[] = {1,1,1,1}; - sizeEx = QUOTE(KAT_POS_H(0.8)); + sizeEx = QUOTE(FRAME_H(1.3)); }; class KatminDay: RscText { @@ -103,13 +118,13 @@ class RscTitles shadow = 0; font = "PuristaBold"; text = "01"; //--- ToDo: Localize; - x = "0.157316 * safezoneW + safezoneX"; - y = "0.8525 * safezoneH + safezoneY"; - w = "0.0257812 * safezoneW"; - h = "0.013 * safezoneH"; + x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(2)); + y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(6.3)); + w = QUOTE(FRAME_W(2.5)); + h = QUOTE(FRAME_H(1.5)); colorBackground[] = {0,0,0,0}; colorText[] = {1,1,1,1}; - sizeEx = QUOTE(KAT_POS_H(0.8)); + sizeEx = QUOTE(FRAME_H(1.3)); }; class KatminBaro: RscText { @@ -119,13 +134,13 @@ class RscTitles shadow = 0; font = "PuristaBold"; text = "760"; //--- ToDo: Localize; - x = "0.158625 * safezoneW + safezoneX"; - y = "0.80844 * safezoneH + safezoneY"; - w = "0.020625 * safezoneW"; - h = "0.022 * safezoneH"; + x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(1.2)); + y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(8.8)); + w = QUOTE(FRAME_W(2.5)); + h = QUOTE(FRAME_H(1.5)); colorBackground[] = {0,0,0,0}; colorText[] = {1,1,1,1}; - sizeEx = QUOTE(KAT_POS_H(0.95)); + sizeEx = QUOTE(FRAME_H(1.4)); }; class KatminHR: RscText { @@ -135,13 +150,13 @@ class RscTitles shadow = 0; font = "PuristaBold"; text = "80"; //--- ToDo: Localize; - x = "0.149375 * safezoneW + safezoneX"; - y = "0.8732 * safezoneH + safezoneY"; - w = "0.020625 * safezoneW"; - h = "0.022 * safezoneH"; + x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(2.2)); + y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(4.7)); + w = QUOTE(FRAME_W(2.5)); + h = QUOTE(FRAME_H(1.5)); colorBackground[] = {0,0,0,0}; colorText[] = {1,1,1,1}; - sizeEx = QUOTE(KAT_POS_H(1.2)); + sizeEx = QUOTE(FRAME_H(1.8)); }; class KatminO2: RscText { @@ -151,13 +166,13 @@ class RscTitles shadow = 0; font = "PuristaBold"; text = "97"; //--- ToDo: Localize; - x = "0.118469 * safezoneW + safezoneX"; - y = "0.8732 * safezoneH + safezoneY"; - w = "0.020625 * safezoneW"; - h = "0.022 * safezoneH"; + x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(5.5)); + y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(4.7)); + w = QUOTE(FRAME_W(2.5)); + h = QUOTE(FRAME_H(1.5)); colorBackground[] = {0,0,0,0}; colorText[] = {1,1,1,1}; - sizeEx = QUOTE(KAT_POS_H(1.2)); + sizeEx = QUOTE(FRAME_H(1.8)); }; class KatminTemp: RscText { @@ -167,13 +182,13 @@ class RscTitles shadow = 0; font = "PuristaBold"; text = "76F"; //--- ToDo: Localize; - x = "0.134937 * safezoneW + safezoneX"; - y = "0.8094 * safezoneH + safezoneY"; - w = "0.020625 * safezoneW"; - h = "0.022 * safezoneH"; + x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(3.7)); + y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(8.8)); + w = QUOTE(FRAME_W(2.5)); + h = QUOTE(FRAME_H(1.5)); colorBackground[] = {0,0,0,0}; colorText[] = {1,1,1,1}; - sizeEx = QUOTE(KAT_POS_H(1)); + sizeEx = QUOTE(FRAME_H(1.4)); }; class KatminAltitude: RscText { @@ -183,11 +198,13 @@ class RscTitles shadow = 0; font = "PuristaBold"; text = "1000"; - x = "0.111219 * safezoneW + safezoneX"; - y = "0.80844 * safezoneH + safezoneY"; - w = "0.020625 * safezoneW"; - h = "0.022 * safezoneH"; - sizeEx = QUOTE(KAT_POS_H(0.95)); + x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(6.4)); + y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(8.8)); + w = QUOTE(FRAME_W(2.5)); + h = QUOTE(FRAME_H(1.5)); + colorBackground[] = {0,0,0,0}; + colorText[] = {1,1,1,1}; + sizeEx = QUOTE(FRAME_H(1.4)); }; }; }; diff --git a/addons/watch/functions/fnc_showKWatch.sqf b/addons/watch/functions/fnc_showKWatch.sqf index 2d13cb56c..8312da2d8 100644 --- a/addons/watch/functions/fnc_showKWatch.sqf +++ b/addons/watch/functions/fnc_showKWatch.sqf @@ -48,7 +48,7 @@ private _altitude = _display displayCtrl 22007; _pfhID call CBA_fnc_removePerFrameHandler; }; - _compass ctrlSetAngle [(getDirVisual _unit), 0.5, 0.5, true]; + _compass ctrlSetAngle [(linearConversion[0,360,(getDirVisual _unit),360,0]), 0.5, 0.5, true]; _compass ctrlCommit 0.1; }, 0.05, [ _unit,