Skip to content

Commit

Permalink
Circulation - Fix random deteriorate time for advanced rhythm (#440)
Browse files Browse the repository at this point in the history
Changed ''AdvRhythm_deteriorateTimeWeight'' to
''AdvRhythm_deteriorateTimeMax'' when applicable. This should fix the
bell curve to implement both values instead of just the setting
regarding ''AdvRhythm_deteriorateTimeWeight''.

**When merged this pull request will:**
- _Describe what this pull request will do_
- _Each change in a separate line_

### 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
Serrager authored Oct 30, 2023
1 parent 62a2aa7 commit 5467a86
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions addons/circulation/functions/fnc_handleCardiacArrest.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ if (_initial) then {
if (GVAR(AdvRhythm_canDeteriorate)) then {
private _timeToDeteriorate = 0;

if (GVAR(AdvRhythm_deteriorateTimeWeight) < GVAR(AdvRhythm_deteriorateTimeWeight)) then {
_timeToDeteriorate = random [20, GVAR(AdvRhythm_deteriorateTimeWeight), GVAR(AdvRhythm_deteriorateTimeWeight)];
if (GVAR(AdvRhythm_deteriorateTimeWeight) < GVAR(AdvRhythm_deteriorateTimeMax)) then {
_timeToDeteriorate = random [20, GVAR(AdvRhythm_deteriorateTimeWeight), GVAR(AdvRhythm_deteriorateTimeMax)];
} else {
_timeToDeteriorate = random [20, GVAR(AdvRhythm_deteriorateTimeWeight) / 2, GVAR(AdvRhythm_deteriorateTimeWeight)];
_timeToDeteriorate = random [20, GVAR(AdvRhythm_deteriorateTimeMax) / 2, GVAR(AdvRhythm_deteriorateTimeMax)];
};

switch (_cardiacArrestType) do {
Expand Down Expand Up @@ -147,4 +147,4 @@ if (GVAR(AdvRhythm_canDeteriorate)) then {
};
default {};
};
};
};

0 comments on commit 5467a86

Please sign in to comment.