diff --git a/Sources/epoch_code/compile/setup/masterLoop/init.sqf b/Sources/epoch_code/compile/setup/masterLoop/init.sqf index 8af29a83..ebfd45f8 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/init.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/init.sqf @@ -330,3 +330,10 @@ _EPOCH_BuildTraderMisson = { _epoch_tradermissionarray = []; EPOCH_ActiveTraderMission = []; _LastMissionTrigger = 0; + +// setup radio active locations +{ + _x params ["_loc", "_rads"]; + _loc setVariable ["EPOCH_Rads", _rads]; +} forEach (missionNamespace getVariable ["EPOCH_radioactiveLocations", []]); +// diff --git a/Sources/epoch_server/init/server_init.sqf b/Sources/epoch_server/init/server_init.sqf index a6f44239..7758299e 100644 --- a/Sources/epoch_server/init/server_init.sqf +++ b/Sources/epoch_server/init/server_init.sqf @@ -278,15 +278,17 @@ missionNamespace setVariable ["EPOCH_taxRate", [_serverSettingsConfig, "taxRate" // pick random radioactive locations _radioactiveLocations = getArray(_epochConfig >> worldName >> "radioactiveLocations"); +_radioactiveLocationsTmp = []; if !(_radioactiveLocations isEqualTo []) then { private _locations = nearestLocations[epoch_centerMarkerPosition, _radioactiveLocations, EPOCH_dynamicVehicleArea]; if !(_locations isEqualTo []) then { + for "_i" from 0 to (getNumber(_epochConfig >> worldName >> "radioactiveLocationsCount")) do { if (_locations isEqualTo []) exitWith {}; private _selectedLoc = selectRandom _locations; _locations = _locations - [_selectedLoc]; - _selectedLoc setVariable ["EPOCH_Rads", random 666, true]; + _radioactiveLocationsTmp pushBack [_selectedLoc,random 666]; private _position = locationPosition _selectedLoc; _marker = name _selectedLoc; _marker = createMarker[_marker, _position]; @@ -297,6 +299,7 @@ if !(_radioactiveLocations isEqualTo []) then { }; }; }; +missionNamespace setVariable ["EPOCH_radioactiveLocations", _radioactiveLocationsTmp, true]; // start accepting logins missionNamespace setVariable ["EPOCH_SERVER_READY", true, true];