Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various fixes for the medical restructure branch #6434

Merged
merged 12 commits into from
Jul 16, 2018
6 changes: 3 additions & 3 deletions addons/medical/functions/fnc_addDamageToUnit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ if (!isNull _instigator) then {
};

#ifdef DEBUG_TESTRESULTS
private _startDmg = +(_unit getVariable [QGVAR(bodyPartDamage), [-1]]);
private _startDmg = +(_unit getVariable [QGVAR(medical,bodyPartDamage), [-1]]);
private _startPain = GET_PAIN(_unit);
#endif

[QEGVAR(medical_engine,woundReceived), [_unit, _bodyPart, _damageToAdd, _instigator, _typeOfDamage]] call CBA_fnc_localEvent;
[QEGVAR(medical,woundReceived), [_unit, _bodyPart, _damageToAdd, _instigator, _typeOfDamage]] call CBA_fnc_localEvent;

#ifdef DEBUG_TESTRESULTS
private _endDmg = _unit getVariable [QGVAR(bodyPartDamage), [-1]];
private _endDmg = _unit getVariable [QGVAR(medical,bodyPartDamage), [-1]];
private _endPain = GET_PAIN(_unit);
private _typeOfDamageAdj = _typeOfDamage call EFUNC(medical_damage,getTypeOfDamage);
private _config = configFile >> "ACE_Medical_Injuries" >> "damageTypes" >> _typeOfDamageAdj;
Expand Down
2 changes: 1 addition & 1 deletion addons/medical/functions/fnc_dev_watchMedicalStats.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

// Damage:
private _damage = _unit getVariable [QEGVAR(medical,bodyPartDamage), [0,0,0,0,0,0]];
private _limping = if (_unit getVariable [QEGVAR(medical_engine,isLimping), false]) then {"[<t color ='#FFCC22'> Limping </t>]"} else {""};
private _limping = if (_unit getVariable [QEGVAR(medical,isLimping), false]) then {"[<t color ='#FFCC22'> Limping </t>]"} else {""};
_return pushBack format ["Damage: [H: %1] [B: %2] %3", (_damage select 0) toFixed 2, (_damage select 1) toFixed 2, _limping];
_return pushBack format ["[LA:%1] [RA: %2] [LL:%3] [RL: %4]", (_damage select 2) toFixed 2, (_damage select 3) toFixed 2, (_damage select 4) toFixed 2, (_damage select 5) toFixed 2];

Expand Down
2 changes: 1 addition & 1 deletion addons/medical/functions/fnc_handleIncapacitation.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ private _damageThreshold = if (isPlayer _unit) then {
};

if ((_headDamage > _damageThreshold / 2) || {_bodyDamage > _damageThreshold} || {(_painLevel >= PAIN_UNCONSCIOUS) && {random 1 < 0.1}}) then {
[QGVAR(CriticalInjury), _unit] call CBA_fnc_localEvent;
[QEGVAR(medical,CriticalInjury), _unit] call CBA_fnc_localEvent;
};
146 changes: 0 additions & 146 deletions addons/medical/functions/fnc_unconsciousPFH.sqf

This file was deleted.

18 changes: 9 additions & 9 deletions addons/medical/script_macros_medical.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@
// - Unit Functions ---------------------------------------------------
// Retrieval macros for common unit values
// Defined for easy consistency and speed
#define GET_BLOOD_VOLUME(unit) (GETVAR(unit,VAR_BLOOD_VOL,DEFAULT_BLOOD_VOLUME))
#define GET_HEART_RATE(unit) (GETVAR(unit,VAR_HEART_RATE,DEFAULT_HEART_RATE))
#define GET_HEMORRHAGE(unit) (GETVAR(unit,VAR_HEMORRHAGE,0))
#define GET_PAIN(unit) (GETVAR(unit,VAR_PAIN,0))
#define GET_PAIN_SUPPRESS(unit) (GETVAR(unit,VAR_PAIN_SUPP,0))
#define IN_CRDC_ARRST(unit) (GETVAR(unit,VAR_CRDC_ARRST,false))
#define IS_BLEEDING(unit) (GETVAR(unit,VAR_IS_BLEEDING,false))
#define IS_IN_PAIN(unit) (GETVAR(unit,VAR_IN_PAIN,false))
#define IS_UNCONSCIOUS(unit) (GETVAR(unit,VAR_UNCON,false))
#define GET_BLOOD_VOLUME(unit) (unit getVariable [VAR_BLOOD_VOL,DEFAULT_BLOOD_VOLUME])
#define GET_HEART_RATE(unit) (unit getVariable [VAR_HEART_RATE,DEFAULT_HEART_RATE])
#define GET_HEMORRHAGE(unit) (unit getVariable [VAR_HEMORRHAGE,0])
#define GET_PAIN(unit) (unit getVariable [VAR_PAIN,0])
#define GET_PAIN_SUPPRESS(unit) (unit getVariable [VAR_PAIN_SUPP,0])
#define IN_CRDC_ARRST(unit) (unit getVariable [VAR_CRDC_ARRST,false])
#define IS_BLEEDING(unit) (unit getVariable [VAR_IS_BLEEDING,false])
#define IS_IN_PAIN(unit) (unit getVariable [VAR_IN_PAIN,false])
#define IS_UNCONSCIOUS(unit) (unit getVariable [VAR_UNCON,false])

// The following function calls are defined here just for consistency
#define GET_BLOOD_LOSS(unit) ([unit] call EFUNC(medical_status,getBloodLoss))
Expand Down
Loading