From 25528b59c3d4fbca76330ae124eac6078eb5b2f6 Mon Sep 17 00:00:00 2001 From: Raymix Date: Sun, 22 Oct 2017 18:39:29 +0100 Subject: [PATCH] revert location changes + fix math in rads calc --- Sources/epoch_code/compile/setup/masterLoop/Event5.sqf | 3 ++- Sources/epoch_code/compile/setup/masterLoop/init.sqf | 2 ++ Sources/epoch_server/init/server_init.sqf | 3 +-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Sources/epoch_code/compile/setup/masterLoop/Event5.sqf b/Sources/epoch_code/compile/setup/masterLoop/Event5.sqf index 9edab396..c5c3692c 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/Event5.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/Event5.sqf @@ -50,7 +50,8 @@ if (_outOfBounds) then { //Reduce % radiation from max armor value possible _maxArmor = (missionNamespace getVariable ["EPOCH_MAX_ARMOR",[0,0,0,2300]]) select 3; -_currentArmorPercent = (((uniform player) call EPOCH_uniformArmorCalc) + ((vest player) call EPOCH_gearArmorCalc) + ((headgear player) call EPOCH_gearArmorCalc)) / _maxArmor * 100; +_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?) diff --git a/Sources/epoch_code/compile/setup/masterLoop/init.sqf b/Sources/epoch_code/compile/setup/masterLoop/init.sqf index ac02f4a8..c0228ad0 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/init.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/init.sqf @@ -336,7 +336,9 @@ EPOCH_ActiveTraderMission = []; _LastMissionTrigger = 0; // setup radio active locations +/* { _x params ["_loc", "_rads","_markers"]; _loc setVariable ["EPOCH_Rads", _rads]; } forEach (missionNamespace getVariable ["EPOCH_radioactiveLocations", []]); +*/ \ No newline at end of file diff --git a/Sources/epoch_server/init/server_init.sqf b/Sources/epoch_server/init/server_init.sqf index 3546338c..25950bdf 100644 --- a/Sources/epoch_server/init/server_init.sqf +++ b/Sources/epoch_server/init/server_init.sqf @@ -271,10 +271,9 @@ if !(_radioactiveLocations isEqualTo []) then { _locations = _locations - [_selectedLoc]; _locSize = size _selectedLoc; _radius = sqrt((_locSize select 0)^2 + (_locSize select 1)^2); + _radioactiveLocationsTmp pushBack [_selectedLoc,[random 666,_radius]]; private _position = locationPosition _selectedLoc; - _createdLoc = createLocation ["NameLocal", _position, _radius, _radius]; _markers = ["Radiation", _position] call EPOCH_server_createGlobalMarkerSet; - _radioactiveLocationsTmp pushBack [_createdLoc,[random 666,_radius],_markers]; }; }; };