Skip to content

Commit 8f69dae

Browse files
General - Fix undefined variables (KAT-Advanced-Medical#760)
**When merged this pull request will:** - Title ### IMPORTANT - [Development Guidelines](https://ace3.acemod.org/wiki/development/) are read, understood and applied. - Title of this PR uses our standard template `Component - Add|Fix|Improve|Change|Make|Remove {changes}`.
1 parent fbb73d0 commit 8f69dae

19 files changed

Lines changed: 31 additions & 30 deletions

addons/airway/XEH_postInit.sqf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
if !(GVAR(enable)) exitWith {};
44

5-
[QGVAR(larynxLocal), LINKFUNC(treatmentAdvanced_larynxLocal)] call CBA_fnc_addEventHandler;
65
[QGVAR(airwayLocal), LINKFUNC(treatmentAdvanced_airwayLocal)] call CBA_fnc_addEventHandler;
7-
[QGVAR(guedelLocal), LINKFUNC(treatmentAdvanced_guedelLocal)] call CBA_fnc_addEventHandler;
86
[QGVAR(accuvacLocal), LINKFUNC(treatmentAdvanced_accuvacLocal)] call CBA_fnc_addEventHandler;
97
[QGVAR(recoveryPositionLocal), LINKFUNC(treatmentAdvanced_RecoveryPositionLocal)] call CBA_fnc_addEventHandler;
108
[QGVAR(cancelRecoveryPositionLocal), LINKFUNC(treatmentAdvanced_CancelRecoveryPositionLocal)] call CBA_fnc_addEventHandler;

addons/breathing/XEH_postInit.sqf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
[QGVAR(handleBreathing), LINKFUNC(handleBreathing)] call CBA_fnc_addEventHandler;
66
[QGVAR(hemopneumothoraxLocal), LINKFUNC(treatmentAdvanced_hemopneumothoraxLocal)] call CBA_fnc_addEventHandler;
77
[QGVAR(tensionpneumothoraxLocal), LINKFUNC(treatmentAdvanced_tensionpneumothoraxLocal)] call CBA_fnc_addEventHandler;
8-
[QGVAR(cyanosisLocal), LINKFUNC(treatmentAdvanced_CyanosisLocal)] call CBA_fnc_addEventHandler;
98
[QGVAR(nasalCannulaLocal), LINKFUNC(treatmentAdvanced_nasalCannulaLocal)] call CBA_fnc_addEventHandler;
109
[QGVAR(removeNasalCannulaLocal), LINKFUNC(treatmentAdvanced_removeNasalCannulaLocal)] call CBA_fnc_addEventHandler;
1110

addons/breathing/functions/fnc_attachPersonalOxygen.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ _patient setVariable [QGVAR(oxygenMaskStatus), [(_largestTankValue + 1), 1], tru
6565
_pfhID call CBA_fnc_removePerFrameHandler;
6666
};
6767

68-
if !(_patient setVariable [QGVAR(oxygenMaskActive), true]) exitWith {
68+
if !(_patient getVariable [QGVAR(oxygenMaskActive), true]) exitWith {
6969
_pfhID call CBA_fnc_removePerFrameHandler;
7070
};
7171

addons/chemical/functions/fnc_enableChemDetector.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ _unit setVariable [QGVAR(detectorEnabled), true, true];
3131

3232
if !("KAT_ChemicalDetector" in assignedItems _unit) exitWith {
3333
_unit setVariable [QGVAR(detectorEnabled), false, true];
34-
_pfhID call CBA_fnc_removePerFrameHandler;
34+
_idPFH call CBA_fnc_removePerFrameHandler;
3535
};
3636

3737
private _detectorSound = _unit getVariable [QGVAR(detectorSound), false];

addons/circulation/functions/fnc_AEDX_ViewMonitor.sqf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,9 @@ GVAR(PulseRateReady) = true;
336336

337337
isNull _dlg || GVAR(AEDX_MonitorTarget) getVariable [QGVAR(Defibrillator_Charged), false];
338338
}, {
339-
params ["_dlg", "_chargeBar"];
339+
params ["_dlg"];
340340

341341
if !(isNull _dlg) then {
342342
[true] call FUNC(AEDX_ViewMonitor_Charging);
343343
};
344-
}, [_dlg, _chargeBar], 4, {}] call CBA_fnc_waitUntilAndExecute;
344+
}, [_dlg], 4, {}] call CBA_fnc_waitUntilAndExecute;

addons/circulation/functions/fnc_addDefibrillatorActions.sqf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ switch (_type) do { // AED-X pads
5959
[_medic, _patient, "rightarm", "AEDXStationConnectVitalsMonitor", [_defibObject]] call EFUNC(misc,treatment);
6060
},
6161
{
62+
params ["_medic", "", "_args"];
63+
_args params ["_patient", "_defibObject"];
64+
6265
[_medic, _patient, "rightarm", "AEDXStationConnectVitalsMonitor", [_defibObject]] call ACEFUNC(medical_treatment,canTreat);
6366
},
6467
{

addons/circulation/functions/fnc_handleCardiacArrest.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ if (_initial) then {
5757
_cardiacArrestType = 2;
5858
};
5959

60-
private _nitroCount = ([_patient, "Nitroglycerin", false] call ACEFUNC(medical_status,getMedicationCount)) select 1;
60+
private _nitroCount = ([_unit, "Nitroglycerin", false] call ACEFUNC(medical_status,getMedicationCount)) select 1;
6161

6262
if ((_nitroCount < 0.5) && ((random 3) < 1)) then {
6363
_cardiacArrestType = 2;

addons/hypothermia/functions/fnc_checkHandWarmers.sqf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@
44
* Checks handwarmer status
55
*
66
* Arguments:
7-
* 0: Patient <OBJECT>
7+
* 0: Player <OBJECT>
8+
* 1: Target <OBJECT>
89
*
910
* Return Value:
1011
* None
1112
*
1213
* Example:
13-
* [patient] call kat_hypothermia_fnc_checkHandWarmers;
14+
* [player, cursorObject] call kat_hypothermia_fnc_checkHandWarmers;
1415
*
1516
* Public: No
1617
*/
1718

18-
params ["_target"];
19+
params ["_player", "_target"];
1920

2021
private _warmers = _target getVariable [QGVAR(handWarmers), [0,0,0,0,0,0]];
2122
_warmers params ["_head", "_body", "_larm", "_rarm", "_lleg", "_rleg"];

addons/misc/functions/fnc_addVehicleUnloadCarryPatientActions.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ private _actions = [];
4040
},
4141
{},
4242
[_unit]
43-
] call ACEFUNC(interact_menu,createAction),[], _medic];
43+
] call ACEFUNC(interact_menu,createAction),[], _unit];
4444
};
4545
} forEach (_vehicleSeats);
4646

addons/misc/functions/fnc_setUnconscious.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ if (_knockOut) then {
5050
KAT_forceWakeup = true;
5151
[{
5252
params [["_unit", objNull]];
53-
if ((alive _unit) && {_unit call FUNC(hasStableVitals)}) then {
53+
if ((alive _unit) && {_unit call EFUNC(vitals,hasStableVitals)}) then {
5454
[QACEGVAR(medical,WakeUp), _unit] call CBA_fnc_localEvent;
5555
KAT_forceWakeup = false;
5656
} else {

0 commit comments

Comments
 (0)