mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix pain percieved function calls
This commit is contained in:
parent
909ae27721
commit
c92fd89c7a
@ -27,7 +27,7 @@ if (isServer) then {
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
[missionNamespace, "ACE_setCustomAimCoef", QUOTE(ADDON), {
|
||||
private _pain = [ACE_player] call FUNC(getPainLevel);
|
||||
private _pain = GET_PAIN_PERCEIVED(ACE_player);
|
||||
|
||||
linearConversion [0, 1, _pain, 1, 5, true];
|
||||
}] call EFUNC(common,arithmeticSetSource);
|
||||
|
@ -57,7 +57,7 @@
|
||||
// Pain:
|
||||
private _pain = _unit getVariable [QEGVAR(medical,pain), 0];
|
||||
private _painSuppress = _unit getVariable [QEGVAR(medical,painSuppress), 0];
|
||||
private _painLevel = [_unit] call EFUNC(medical,getPainLevel);
|
||||
private _painLevel = GET_PAIN_PERCEIVED(_unit);
|
||||
_return pushBack format ["Effective Pain: %1", _painLevel toFixed 3];
|
||||
_return pushBack format [" - [Pain: %1] [Suppress: %2]", _pain toFixed 3, _painSuppress toFixed 3];
|
||||
|
||||
|
@ -63,7 +63,7 @@ if (_show == 1) then {
|
||||
_genericMessages pushback [localize ELSTRING(medical,Status_Tourniquet_Applied), [0.77, 0.51, 0.08, 1]];
|
||||
};
|
||||
if (EGVAR(medical,showPainInMenu) && {[ACE_player, EGVAR(medical,medicSetting_PainVisualization)] call EFUNC(medical,isMedic)}) then {
|
||||
private _painLevel = _target call EFUNC(medical,getPainLevel);
|
||||
private _painLevel = GET_PAIN_PERCEIVED(_target);
|
||||
if (_painLevel > 0) then {
|
||||
private _painText = localize ELSTRING(medical,Status_Pain);
|
||||
if (_painLevel < 0.1) then {
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
private _painLevel = [_unit] call FUNC(getPainLevel);
|
||||
private _painLevel = GET_PAIN_PERCEIVED(_unit);
|
||||
private _bodyPartDamage = _unit getVariable [QGVAR(bodyPartDamage), [0,0,0,0,0,0]];
|
||||
|
||||
_bodyPartDamage params ["_headDamage", "_bodyDamage", "_leftArmDamage", "_rightArmDamage", "_leftLegDamage", "_rightLegDamage"];
|
||||
|
@ -18,7 +18,7 @@
|
||||
if !(alive _this) exitWith {false};
|
||||
|
||||
private _bloodLoss = GET_BLOOD_LOSS(_this);
|
||||
private _pain = GET_PAIN_TOTAL(_this);
|
||||
private _pain = GET_PAIN_PERCEIVED(_this);
|
||||
private _unconscious = IS_UNCONSCIOUS(_this);
|
||||
|
||||
(_bloodLoss > 0) || {_pain > 0.2} || _unconscious
|
||||
|
@ -40,7 +40,7 @@ if (((_target getVariable [QEGVAR(medical,tourniquets), [0, 0, 0, 0, 0, 0]]) sel
|
||||
};
|
||||
|
||||
if (EGVAR(medical,showPainInMenu) && {[ACE_player, EGVAR(medical,medicSetting_PainVisualization)] call EFUNC(medical,isMedic)}) then {
|
||||
private _painLevel = _target call EFUNC(medical,getPainLevel);
|
||||
private _painLevel = GET_PAIN_PERCEIVED(_target);
|
||||
if (_painLevel > 0) then {
|
||||
private _painText = localize ELSTRING(medical,Status_Pain);
|
||||
if (_painLevel < 0.1) then {
|
||||
|
@ -15,7 +15,7 @@ if (!local _unit) exitWith {
|
||||
|
||||
[_unit] call FUNC(handleUnitVitals);
|
||||
|
||||
private _painLevel = [_unit] call FUNC(getPainLevel);
|
||||
private _painLevel = GET_PAIN_PERCEIVED(_unit);
|
||||
if (_painLevel > 0) then {
|
||||
[_unit, "moan", PAIN_TO_MOAN(_painLevel)] call EFUNC(medical_engine,playInjuredSound);
|
||||
};
|
||||
|
@ -15,7 +15,7 @@ if (!local _unit) exitWith {
|
||||
|
||||
[_unit] call FUNC(handleUnitVitals);
|
||||
|
||||
private _painLevel = [_unit] call FUNC(getPainLevel);
|
||||
private _painLevel = GET_PAIN_PERCEIVED(_unit);
|
||||
if (_painLevel > 0) then {
|
||||
[_unit, "moan", PAIN_TO_MOAN(_painLevel)] call EFUNC(medical_engine,playInjuredSound);
|
||||
};
|
||||
|
@ -16,7 +16,7 @@ if (!local _unit) exitWith {
|
||||
|
||||
[_unit] call FUNC(handleUnitVitals);
|
||||
|
||||
private _painLevel = [_unit] call FUNC(getPainLevel);
|
||||
private _painLevel = GET_PAIN_PERCEIVED(_unit);
|
||||
if (_painLevel > 0) then {
|
||||
[_unit, "moan", PAIN_TO_MOAN(_painLevel)] call EFUNC(medical_engine,playInjuredSound);
|
||||
};
|
||||
|
@ -73,7 +73,7 @@ if (_bloodLoss > 0) then {
|
||||
};
|
||||
};
|
||||
|
||||
private _painLevel = [_unit] call FUNC(getPainLevel);
|
||||
private _painLevel = GET_PAIN_PERCEIVED(_unit);
|
||||
if (_painLevel > 0) then {
|
||||
if !(_unit getVariable [QGVAR(hasPain), false]) then {
|
||||
_unit setVariable [QGVAR(hasPain), true, true];
|
||||
|
@ -52,7 +52,7 @@ if (!(_unit getVariable [QGVAR(inCardiacArrest), false])) then {
|
||||
if (_bloodVolume > BLOOD_VOLUME_CLASS_4_HEMORRHAGE) then {
|
||||
([_unit] call FUNC(getBloodPressure)) params ["_bloodPressureL", "_bloodPressureH"];
|
||||
private _meanBP = (2/3) * _bloodPressureH + (1/3) * _bloodPressureL;
|
||||
private _painLevel = [_unit] call FUNC(getPainLevel);
|
||||
private _painLevel = GET_PAIN_PERCEIVED(_unit);
|
||||
|
||||
private _targetBP = 107;
|
||||
if (_bloodVolume < BLOOD_VOLUME_CLASS_3_HEMORRHAGE) then {
|
||||
|
Loading…
Reference in New Issue
Block a user