Skip to content

Commit

Permalink
Fix some script errors on medical rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
thojkooi committed Jul 18, 2018
1 parent 6497f6c commit 06b8c4f
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion addons/medical_blood/functions/fnc_isBleeding.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
params ["_unit"];

if (GVAR(useAceMedical)) exitWith {
IS_BLEEDING(_unit)
IS_BLEEDING(_unit);
};

alive _unit && {getDammage _unit > 0.3}
2 changes: 1 addition & 1 deletion addons/medical_damage/functions/fnc_woundsHandler.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ _unit setVariable [QEGVAR(medical,bodyPartDamage), _bodyPartDamage, true];
_bodyPartVisParams call EFUNC(medical_engine,updateBodyPartVisuals);

[_unit, _painLevel] call EFUNC(medical,adjustPainLevel);
[QGVAR(medical,injured), [_unit, _painLevel]] call CBA_fnc_localEvent;
[QEGVAR(medical,injured), [_unit, _painLevel]] call CBA_fnc_localEvent;

if (_critialDamage || {_painLevel > PAIN_UNCONSCIOUS}) then {
[_unit] call FUNC(handleIncapacitation);
Expand Down
2 changes: 1 addition & 1 deletion addons/medical_damage/functions/fnc_woundsHandlerSQF.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ _unit setVariable [QEGVAR(medical,bodyPartDamage), _bodyPartDamage, true];
_bodyPartVisParams call EFUNC(medical_engine,updateBodyPartVisuals);

[_unit, _painLevel] call EFUNC(medical,adjustPainLevel);
[QGVAR(medical,injured), [_unit, _painLevel]] call CBA_fnc_localEvent;
[QEGVAR(medical,injured), [_unit, _painLevel]] call CBA_fnc_localEvent;

if (_critialDamage || {_painLevel > PAIN_UNCONSCIOUS}) then {
[_unit] call FUNC(handleIncapacitation);
Expand Down
4 changes: 2 additions & 2 deletions addons/medical_feedback/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#include "script_component.hpp"

[QGVAR(medical,injured), {
[QEGVAR(medical,injured), {
params ["_unit", "_painLevel"];
[_unit, "hit", PAIN_TO_SCREAM(_painLevel)] call FUNC(playInjuredSound);
}] call CBA_fnc_addEventHandler;

[QGVAR(medical,moan), {
[QEGVAR(medical,moan), {
params ["_unit", "_painLevel"];
[_unit, "moan", PAIN_TO_MOAN(_painLevel)] call FUNC(playInjuredSound);
}] call CBA_fnc_addEventHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ if (!local _unit) exitWith {

private _painLevel = GET_PAIN_PERCEIVED(_unit);
if (_painLevel > 0) then {
[QGVAR(medical,moan), [_unit, _painLevel]] call CBA_fnc_localEvent;
[QEGVAR(medical,moan), [_unit, _painLevel]] call CBA_fnc_localEvent;
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ if (!local _unit) exitWith {

private _painLevel = GET_PAIN_PERCEIVED(_unit);
if (_painLevel > 0) then {
[QGVAR(medical,moan), [_unit, _painLevel]] call CBA_fnc_localEvent;
[QEGVAR(medical,moan), [_unit, _painLevel]] call CBA_fnc_localEvent;
};

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if (!local _unit) exitWith {

private _painLevel = GET_PAIN_PERCEIVED(_unit);
if (_painLevel > 0) then {
[QGVAR(medical,moan), [_unit, _painLevel]] call CBA_fnc_localEvent;
[QEGVAR(medical,moan), [_unit, _painLevel]] call CBA_fnc_localEvent;
};

// Handle spontaneous wakeup from unconsciousness
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ _unit setVariable [VAR_UNCON, _knockOut, true];

if (_knockOut) then {
// --- knock out
if (GVAR(spontaneousWakeUpChance) > 0) then { // Don't bother setting this if not used
if (EGVAR(medical,spontaneousWakeUpChance) > 0) then { // Don't bother setting this if not used
private _lastWakeUpCheck = CBA_missiontime max (_unit getVariable [QGVAR(lastWakeUpCheck), 0]);
TRACE_2("setting lastWakeUpCheck",_lastWakeUpCheck,(_lastWakeUpCheck - CBA_missiontime));
_unit setVariable [QGVAR(lastWakeUpCheck), _lastWakeUpCheck];
Expand All @@ -43,7 +43,7 @@ if (_knockOut) then {
closeDialog 0;
};
};
[QGVAR(Unconscious), _unit] call CBA_fnc_localEvent;
[QEGVAR(medical,Unconscious), _unit] call CBA_fnc_localEvent;
} else {
// --- wake up
_unit setVariable [QGVAR(lastWakeUpCheck), nil]; // clear this now (min wait time could be set to a very high value)
Expand Down

0 comments on commit 06b8c4f

Please sign in to comment.