From 978a81fb0aafc2e0bdce5a7604a59637a428354a Mon Sep 17 00:00:00 2001
From: ulteq <ulteq@web.de>
Date: Tue, 6 Dec 2016 14:37:48 +0100
Subject: [PATCH] Removed dead code

---
 addons/medical/XEH_PREP.hpp                   |  1 -
 .../functions/fnc_handleMedications.sqf       | 42 -------------------
 2 files changed, 43 deletions(-)
 delete mode 100644 addons/medical/functions/fnc_handleMedications.sqf

diff --git a/addons/medical/XEH_PREP.hpp b/addons/medical/XEH_PREP.hpp
index 6295eec15f..519a96585c 100644
--- a/addons/medical/XEH_PREP.hpp
+++ b/addons/medical/XEH_PREP.hpp
@@ -16,7 +16,6 @@ PREP(getHeartRateChange);
 PREP(handleIncapacitation);
 PREP(handleKilled);
 PREP(handleLocal);
-PREP(handleMedications);
 PREP(handleStateDefault);
 PREP(handleStateInjured);
 PREP(handleStateUnconscious);
diff --git a/addons/medical/functions/fnc_handleMedications.sqf b/addons/medical/functions/fnc_handleMedications.sqf
deleted file mode 100644
index 00ef00a82c..0000000000
--- a/addons/medical/functions/fnc_handleMedications.sqf
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Author: Glowbal, esteldunedain
- * Medication effect loop for an injection.
- *
- * Arguments:
- * 0: Unit <OBJECT>
- * 1: Name of the Variable that is affected <STRING>
- * 2: Proportion of the effect applied <NUMBER>
- * 3: Rate at which the effect is applied <NUMBER>
- * 4: Viscosity adjustment rate <NUMBER>
- * 5: Pain reduction rate <NUMBER>
- *
- * ReturnValue:
- * None
- *
- * Public: No
- */
-
-#include "script_component.hpp"
-
-params ["_unit", "_variableName", "_amountDecreased","_decreaseRate", "_viscosityAdjustmentRate", "_painReduceRate"];
-
-// If the unit died the loop is finished
-if (!alive _unit) exitWith {};
-
-// If locality changed finish the local loop
-if (!local _unit) exitWith {};
-
-// Apply medicinal effect
-private _usedMeds = (_unit getVariable [_variableName, 0]) - _decreaseRate;
-_unit setVariable [_variableName, _usedMeds];
-
-// Restore the viscosity while the medication is leaving the system
-_unit setVariable [QGVAR(peripheralResistance), ((_unit getVariable [QGVAR(peripheralResistance), 100]) - _viscosityAdjustmentRate) max 0];
-_unit setVariable [QGVAR(painSuppress), ((_unit getVariable [QGVAR(painSuppress), 0]) - _painReduceRate) max 0];
-
-// Exit if the medication has finished it's effect
-_amountDecreased = _amountDecreased + _decreaseRate;
-if (_amountDecreased >= 1 || (_usedMeds <= 0) || !alive _unit) exitWith {};
-
-// Schedule the loop to be executed again 1 sec later
-[DFUNC(medicationEffectLoop), [_unit, _variableName, _amountDecreased, _decreaseRate, _viscosityAdjustmentRate, _painReduceRate], 1] call CBA_fnc_waitAndExecute;