From 1b19df0cbaf2726f47dd0ba43b6e8267b4033888 Mon Sep 17 00:00:00 2001 From: Raymix Date: Sun, 22 Oct 2017 18:49:47 +0100 Subject: [PATCH] another math issue, hopefully last --- .../epoch_code/compile/setup/masterLoop/Event5.sqf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/epoch_code/compile/setup/masterLoop/Event5.sqf b/Sources/epoch_code/compile/setup/masterLoop/Event5.sqf index c5c3692c..a7276480 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/Event5.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/Event5.sqf @@ -48,12 +48,6 @@ if (_outOfBounds) then { }; }; -//Reduce % radiation from max armor value possible -_maxArmor = (missionNamespace getVariable ["EPOCH_MAX_ARMOR",[0,0,0,2300]]) select 3; -_currentArmor = ((uniform player) call EPOCH_uniformArmorCalc) + ((vest player) call EPOCH_gearArmorCalc) + ((headgear player) call EPOCH_gearArmorCalc); -_currentArmorPercent = 100 - (_currentArmor / _maxArmor * 100); -_radsLevel = _currentArmorPercent / 100 * _radsLevel; - //Reduce radiation by 50% for respirators (easy to find loot in construction sites?) if ("respirator_placeholder" in assignedItems player) then { _radsLevel = _radsLevel / 2; @@ -67,6 +61,12 @@ if (uniform player == "hazmat_placeholder") then { _radsLevel = 0; }; +//Reduce % radiation from max armor value possible +_maxArmor = (missionNamespace getVariable ["EPOCH_MAX_ARMOR",[0,0,0,2300]]) select 3; +_currentArmor = ((uniform player) call EPOCH_uniformArmorCalc) + ((vest player) call EPOCH_gearArmorCalc) + ((headgear player) call EPOCH_gearArmorCalc); +_currentArmorPercent = 100 - (_currentArmor / _maxArmor * 100); +_radsLevel = _currentArmorPercent / 100 * _radsLevel; + // Radiation Handler if (_radsLevel > 0) then { // increase rads based on radiation levels