remove "location" type fixing serialization error

This commit is contained in:
DESKTOP-UH65DCE\MusTanG 2017-10-22 20:52:08 -05:00
parent a210dfa60a
commit 02d042b186
3 changed files with 16 additions and 5 deletions

View File

@ -16,9 +16,14 @@ _worldSize = worldSize/2;
_outOfBounds = !(player inArea [[_worldSize,_worldSize,0], _worldSize, _worldSize, 0, true ]);
{
if ((_x select 0) in _nearestLocations) then {
_location = [];
_LocName = (_x select 0) joinString " ";
{
if( (str _x) == _LocName ) exitwith { _location = _x; };
} foreach _nearestLocations;
if !(_location isEqualTo []) then {
_x select 1 params ["_str","_intensity"];
_dist = player distance getPos (_x select 0);
_dist = player distance getPos _location;
_radIntensity = if (_dist <= _intensity) then {
_str / _dist
} else {

View File

@ -27,9 +27,14 @@ _rads = 0;
} forEach _radObjects; //sum up radiation of all objects in vicinity and in FOV
{
if ((_x select 0) in EPOCH_nearestLocations) then {
_location = [];
_LocName = (_x select 0) joinString " ";
{
if( (str _x) == _LocName ) exitwith { _location = _x; };
} foreach EPOCH_nearestLocations;
if !(_location isEqualTo []) then {
_x select 1 params ["_str","_intensity"];
_dist = player distance getPos (_x select 0);
_dist = player distance getPos _location;
_radIntensity = if (_dist <= _intensity) then {
_str / _dist
} else {

View File

@ -277,7 +277,8 @@ 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]];
_locName = (str(_selectedLoc)) splitString " ";
_radioactiveLocationsTmp pushBack [_locName,[random 666,_radius]];
private _position = locationPosition _selectedLoc;
_markers = ["Radiation", _position] call EPOCH_server_createGlobalMarkerSet;
};