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

[MIRROR] Fixes setOxyLoss() for humanoids #1485

Merged
merged 1 commit into from
Nov 23, 2023
Merged

Conversation

SierraHelper
Copy link
Collaborator

Оригинальный PR: Baystation12#34339

For humanoids, getOxyLoss() returns a percentage of oxygen_deprivation, and adjustOxyLoss() adjusts the raw value. In every place it's called, setOxyLoss() is given a percentage value even though it just calls adjustOxyLoss(). It also increases oxygen_deprivation when it should decrease it because of a misordered subtraction. Neither of these problems are relevant when setting oxygen_deprivation from 0 to 0, which is probably why they've gone unnoticed for so long.
To avoid sweeping changes, this PR just makes humans' setOxyLoss() convert percentage oxyLoss to raw oxygen_deprivation when calling adjustOxyLoss().

🆑Qlonever
bugfix: Rescuscitating an asystolic suffocation victim won't cause their oxygenation to plummet.
/:cl:

@SierraHelper SierraHelper requested a review from a team as a code owner November 20, 2023 12:22
@SierraHelper SierraHelper added 🪞 MIR ЯОЯ 📜 CL валиден Ченджлог не содержит ошибок labels Nov 20, 2023
@SuhEugene SuhEugene merged commit 2249904 into dev-sierra Nov 23, 2023
14 checks passed
@SuhEugene SuhEugene deleted the upstream-pr-34339 branch November 23, 2023 09:32
SierraHelper added a commit that referenced this pull request Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪞 MIR ЯОЯ 📜 CL валиден Ченджлог не содержит ошибок
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants