From e955e073f1bb67f552113dc3d1432cd70f454c76 Mon Sep 17 00:00:00 2001 From: Grahame Date: Sat, 28 Oct 2017 15:02:55 -0400 Subject: [PATCH 1/4] Update CfgEpochClient.hpp Added new variable radiationEffectsThreshold, default 10% --- Sources/epoch_config/Configs/CfgEpochClient.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/epoch_config/Configs/CfgEpochClient.hpp b/Sources/epoch_config/Configs/CfgEpochClient.hpp index 0c7996f6..bb6b4aaf 100644 --- a/Sources/epoch_config/Configs/CfgEpochClient.hpp +++ b/Sources/epoch_config/Configs/CfgEpochClient.hpp @@ -23,6 +23,7 @@ class CfgEpochClient radioactiveLocations[] = {"NameCityCapital", "NameCity", "Airport"}; // used for random radioactive locations and to suppress animal spawns within cities. radiatedObjMaxFalloutDist = 125; // max distance radiated object can affect player (number in meters) geigerCounterEnergyUsage = 10; // default loss of 10 energy every 10sec of use + radiationEffectsThreshold = 10; // default level for screen effects to indicate a player's rad dosage (0-100) baseHungerLoss = 2; // increase number to speed up rate of Hunger loss baseThirstLoss = 2; // increase number to speed up rate of Thirst loss From 6d9c145bcaca27e6dbb1a72d6be8de6f26b162cc Mon Sep 17 00:00:00 2001 From: Grahame Date: Sat, 28 Oct 2017 15:04:58 -0400 Subject: [PATCH 2/4] Update init.sqf Added the reading of radiationEffectsThreshold variable from CfgEpochClient.hpp --- Sources/epoch_code/compile/setup/masterLoop/init.sqf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/epoch_code/compile/setup/masterLoop/init.sqf b/Sources/epoch_code/compile/setup/masterLoop/init.sqf index a78a8759..6cd5cf6d 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/init.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/init.sqf @@ -102,6 +102,8 @@ if (isNil "EPOCH_display_setup_complete") then { // Background radiation _outOfBoundsRadiation = ["CfgEpochClient", "outOfBoundsRadiation", 10] call EPOCH_fnc_returnConfigEntryV2; _radsLevel = 0; +// Radiation screen effects threshold +_radiationEffectsThreshold = ["CfgEpochClient", "radiationEffectsThreshold", 10] call EPOCH_fnc_returnConfigEntryV2; _prevEquippedItem = []; _damagePlayer = damage player; From 2fb026df0f9fac485dc9943fd6eabebb0fc496b7 Mon Sep 17 00:00:00 2001 From: Grahame Date: Sat, 28 Oct 2017 15:06:20 -0400 Subject: [PATCH 3/4] Update Event2.sqf Added the variable _radiationEffectsThreshold as the condition for calling post-process screen effects for radiation --- Sources/epoch_code/compile/setup/masterLoop/Event2.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/epoch_code/compile/setup/masterLoop/Event2.sqf b/Sources/epoch_code/compile/setup/masterLoop/Event2.sqf index b3d078fd..833ddfd8 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/Event2.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/Event2.sqf @@ -44,8 +44,8 @@ if (_playerAlcohol > 20) then { // Sets visual effect _playerRadiation = missionNamespace getVariable [_playerRadiationKey, _playerRadiationDefault]; -if (_playerRadiation > 1) then { - _radiationVal = linearConversion [0,100,_playerRadiation,1,10,true]; +if (_playerRadiation > _radiationEffectsThreshold) then { + _radiationVal = linearConversion [0,100,_playerRadiation,0,10,true]; [(ceil _radiationVal)/10, 2] call epoch_setRadiation; } else { [0, 2] call epoch_setRadiation; From 9f45414d2d9f10377104d049db41fcb68fa810e8 Mon Sep 17 00:00:00 2001 From: Grahame Date: Sat, 28 Oct 2017 15:07:24 -0400 Subject: [PATCH 4/4] Update Epoch_setRadiation.sqf Small fix for radiation post process effects when under 10% irradiated --- .../gui/scripts/post_process/Epoch_setRadiation.sqf | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Sources/epoch_code/gui/scripts/post_process/Epoch_setRadiation.sqf b/Sources/epoch_code/gui/scripts/post_process/Epoch_setRadiation.sqf index 19165510..ffb2777f 100644 --- a/Sources/epoch_code/gui/scripts/post_process/Epoch_setRadiation.sqf +++ b/Sources/epoch_code/gui/scripts/post_process/Epoch_setRadiation.sqf @@ -42,9 +42,8 @@ switch _level do { }; case 0.1: { - [(rmx_var_RadiationHandles select 0), _speed, [0.185533,1,1,1,0,true]] call epoch_postprocessAdjust; - [(rmx_var_RadiationHandles select 1), _speed, [1,1,0,0,0,0,0,0,0,0,1,0,0,0,0]] call epoch_postprocessAdjust; - [(rmx_var_RadiationHandles select 2), _speed, [0,0,0]] call epoch_postprocessAdjust; + rmx_var_RadiationHandles call epoch_postprocessDestroy; + rmx_var_RadiationHandles = nil; }; case 0.2: {