spoke too soon, another logic issue fixed

This commit is contained in:
Raymix 2017-10-22 18:59:37 +01:00
parent 1b19df0cba
commit da55cfafb9

View File

@ -48,18 +48,15 @@ if (_outOfBounds) then {
}; };
}; };
//Reduce radiation by 90%
if ("radiation_mask_epoch" in assignedItems player) then {
_radsLevel = _radsLevel - (90 / 100 * _radsLevel);
};
//Reduce radiation by 50% for respirators (easy to find loot in construction sites?) //Reduce radiation by 50% for respirators (easy to find loot in construction sites?)
if ("respirator_placeholder" in assignedItems player) then { if ("respirator_placeholder" in assignedItems player) then {
_radsLevel = _radsLevel / 2; _radsLevel = _radsLevel / 2;
}; };
//Reduce radiation by 90%
if ("radiation_mask_epoch" in assignedItems player) then {
_radsLevel = 90 / 100 * _radsLevel;
};
//Reduce radiation by 100% TODO: move this to top, no point in doing all this calc if hazmat is on.
if (uniform player == "hazmat_placeholder") then {
_radsLevel = 0;
};
//Reduce % radiation from max armor value possible //Reduce % radiation from max armor value possible
_maxArmor = (missionNamespace getVariable ["EPOCH_MAX_ARMOR",[0,0,0,2300]]) select 3; _maxArmor = (missionNamespace getVariable ["EPOCH_MAX_ARMOR",[0,0,0,2300]]) select 3;
@ -67,6 +64,11 @@ _currentArmor = ((uniform player) call EPOCH_uniformArmorCalc) + ((vest player)
_currentArmorPercent = 100 - (_currentArmor / _maxArmor * 100); _currentArmorPercent = 100 - (_currentArmor / _maxArmor * 100);
_radsLevel = _currentArmorPercent / 100 * _radsLevel; _radsLevel = _currentArmorPercent / 100 * _radsLevel;
//Reduce radiation by 100% TODO: move this to top, no point in doing all this calc if hazmat is on.
if (uniform player == "hazmat_placeholder") then {
_radsLevel = 0;
};
// Radiation Handler // Radiation Handler
if (_radsLevel > 0) then { if (_radsLevel > 0) then {
// increase rads based on radiation levels // increase rads based on radiation levels