Skip to content

Commit

Permalink
GUI - Fix wrong diplay of qualitative description of the rate of blee…
Browse files Browse the repository at this point in the history
…ding (#569)

**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}`.
  • Loading branch information
MiszczuZPolski authored Jul 31, 2024
1 parent 7394bf8 commit 759a84b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/gui/functions/fnc_updateInjuryList.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ if (IS_BLEEDING(_target)) then {
switch (ACEGVAR(medical_gui,showBleeding)) do {
case 1: {
// Just show whether the unit is bleeding at all
_entries pushBack [localize ACELSTRING(medical_gui,STATUS_BLEEDING), [1, 0, 0, 1]];
_entries pushBack [localize ACELSTRING(medical_gui,Status_Bleeding), [1, 0, 0, 1]];
};
case 2: {
// Give a qualitative description of the rate of bleeding
private _cardiacOutput = [_target] call ACEFUNC(medical_status,getCardiacOutput);
private _bleedRate = GET_BLOOD_LOSS(_target);
private _bleedRateKO = BLOOD_LOSS_KNOCK_OUT_THRESHOLD_DEFAULT * (_cardiacOutput max 0.05);
private _bleedRateKO = BLOOD_LOSS_KNOCK_OUT_THRESHOLD * (_cardiacOutput max 0.05);
// Use nonzero minimum cardiac output to prevent all bleeding showing as massive during cardiac arrest
switch (true) do {
case (_bleedRate < _bleedRateKO * BLEED_RATE_SLOW): {
Expand Down
3 changes: 3 additions & 0 deletions addons/main/script_macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@
#undef BLOOD_LOSS_KNOCK_OUT_THRESHOLD
#define BLOOD_LOSS_KNOCK_OUT_THRESHOLD ACEGVAR(medical,const_bloodLossKnockOutThreshold)

#undef GET_BLOOD_LOSS
#define GET_BLOOD_LOSS(unit) ([unit] call ACEFUNC(medical_status,getBloodLoss))

// Minimum leg damage required for limping
#undef LIMPING_DAMAGE_THRESHOLD
#define LIMPING_DAMAGE_THRESHOLD ACEGVAR(medical,const_limpingDamageThreshold)
Expand Down

0 comments on commit 759a84b

Please sign in to comment.