mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
move rads for locations to client
locations cannot use public var option
This commit is contained in:
parent
8e698e95db
commit
bf7d35b519
@ -330,3 +330,10 @@ _EPOCH_BuildTraderMisson = {
|
|||||||
_epoch_tradermissionarray = [];
|
_epoch_tradermissionarray = [];
|
||||||
EPOCH_ActiveTraderMission = [];
|
EPOCH_ActiveTraderMission = [];
|
||||||
_LastMissionTrigger = 0;
|
_LastMissionTrigger = 0;
|
||||||
|
|
||||||
|
// setup radio active locations
|
||||||
|
{
|
||||||
|
_x params ["_loc", "_rads"];
|
||||||
|
_loc setVariable ["EPOCH_Rads", _rads];
|
||||||
|
} forEach (missionNamespace getVariable ["EPOCH_radioactiveLocations", []]);
|
||||||
|
//
|
||||||
|
@ -278,15 +278,17 @@ missionNamespace setVariable ["EPOCH_taxRate", [_serverSettingsConfig, "taxRate"
|
|||||||
|
|
||||||
// pick random radioactive locations
|
// pick random radioactive locations
|
||||||
_radioactiveLocations = getArray(_epochConfig >> worldName >> "radioactiveLocations");
|
_radioactiveLocations = getArray(_epochConfig >> worldName >> "radioactiveLocations");
|
||||||
|
_radioactiveLocationsTmp = [];
|
||||||
if !(_radioactiveLocations isEqualTo []) then {
|
if !(_radioactiveLocations isEqualTo []) then {
|
||||||
private _locations = nearestLocations[epoch_centerMarkerPosition, _radioactiveLocations, EPOCH_dynamicVehicleArea];
|
private _locations = nearestLocations[epoch_centerMarkerPosition, _radioactiveLocations, EPOCH_dynamicVehicleArea];
|
||||||
if !(_locations isEqualTo []) then {
|
if !(_locations isEqualTo []) then {
|
||||||
|
|
||||||
for "_i" from 0 to (getNumber(_epochConfig >> worldName >> "radioactiveLocationsCount")) do
|
for "_i" from 0 to (getNumber(_epochConfig >> worldName >> "radioactiveLocationsCount")) do
|
||||||
{
|
{
|
||||||
if (_locations isEqualTo []) exitWith {};
|
if (_locations isEqualTo []) exitWith {};
|
||||||
private _selectedLoc = selectRandom _locations;
|
private _selectedLoc = selectRandom _locations;
|
||||||
_locations = _locations - [_selectedLoc];
|
_locations = _locations - [_selectedLoc];
|
||||||
_selectedLoc setVariable ["EPOCH_Rads", random 666, true];
|
_radioactiveLocationsTmp pushBack [_selectedLoc,random 666];
|
||||||
private _position = locationPosition _selectedLoc;
|
private _position = locationPosition _selectedLoc;
|
||||||
_marker = name _selectedLoc;
|
_marker = name _selectedLoc;
|
||||||
_marker = createMarker[_marker, _position];
|
_marker = createMarker[_marker, _position];
|
||||||
@ -297,6 +299,7 @@ if !(_radioactiveLocations isEqualTo []) then {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
missionNamespace setVariable ["EPOCH_radioactiveLocations", _radioactiveLocationsTmp, true];
|
||||||
|
|
||||||
// start accepting logins
|
// start accepting logins
|
||||||
missionNamespace setVariable ["EPOCH_SERVER_READY", true, true];
|
missionNamespace setVariable ["EPOCH_SERVER_READY", true, true];
|
||||||
|
Loading…
Reference in New Issue
Block a user