Merge branch 'master' of github.com:KoffeinFlummi/ACE3

This commit is contained in:
Nicolás Badano 2015-01-20 02:58:45 -03:00
commit 544dbb1e29
5 changed files with 47 additions and 31 deletions

View File

@ -20,4 +20,4 @@ _color = getArray (_config >> "color");
((ctrlParent _ctrl) displayCtrl 102) ctrlSetTextColor _color;
GVAR(currentMarkerColor) = _data;
GVAR(currentMarkerColorConfigName) = (configName _config);

View File

@ -14,4 +14,4 @@ _icon = getText (_config >> "icon");
((ctrlParent _ctrl) displayCtrl 102) ctrlSetText _icon;
GVAR(currentMarkerShape) = _data;
GVAR(currentMarkerConfigName) = (configName _config);

View File

@ -32,8 +32,8 @@ if (_this select 1 == 1) then {
[QGVAR(setMarkerNetwork), [
allMapMarkers select (count allMapMarkers - 1), [
GETGVAR(currentMarkerShape,0),
GETGVAR(currentMarkerColor,0),
GETGVAR(currentMarkerConfigName,""),
GETGVAR(currentMarkerColorConfigName,""),
_this,
GETGVAR(currentMarkerAngle,0)
]

View File

@ -8,20 +8,28 @@ _allMapMarkersProperties = _this select 1;
_logic = _this select 2;
{
_index = _allMapMarkers find _x;
_index = _allMapMarkers find _x;
if (_index != -1) then {
_data = _allMapMarkersProperties select _index;
if (_index != -1) then {
_data = _allMapMarkersProperties select _index;
_config = (configfile >> "CfgMarkers") select (_data select 0);
_x setMarkerTypeLocal configName _config;
_config = (configfile >> "CfgMarkerColors") select (_data select 1);
_x setMarkerColorLocal configName _config;
_x setMarkerPosLocal (_data select 2);
_x setMarkerDirLocal (_data select 3);
_config = (configfile >> "CfgMarkers") >> (_data select 0);
if (!isClass _config) then {
WARNING("CfgMarker not found, changed to milDot");
_config == (configFile >> "CfgMarkers" >> "MilDot");
};
_x setMarkerTypeLocal (configName _config);
_config = (configfile >> "CfgMarkerColors") >> (_data select 1);
if (!isClass _config) then {
WARNING("CfgMarkerColors not found, changed to Default");
_config == (configFile >> "CfgMarkerColors" >> "Default");
};
_x setMarkerColorLocal (configName _config);
_x setMarkerPosLocal (_data select 2);
_x setMarkerDirLocal (_data select 3);
};
} forEach allMapMarkers;
deleteVehicle _logic;

View File

@ -6,10 +6,18 @@ private ["_marker", "_data", "_config"];
_marker = _this select 0;
_data = _this select 1;
_config = (configfile >> "CfgMarkers") select (_data select 0);
_marker setMarkerTypeLocal configName _config;
_config = (configfile >> "CfgMarkers") >> (_data select 0);
if (!isClass _config) then {
WARNING("CfgMarker not found, changed to milDot");
_config == (configFile >> "CfgMarkers" >> "MilDot");
};
_marker setMarkerTypeLocal (configName _config);
_config = (configfile >> "CfgMarkerColors") select (_data select 1);
_config = (configfile >> "CfgMarkerColors") >> (_data select 1);
if (!isClass _config) then {
WARNING("CfgMarkerColors not found, changed to Default");
_config == (configFile >> "CfgMarkerColors" >> "Default");
};
_marker setMarkerColorLocal configName _config;
_marker setMarkerPosLocal (_data select 2);
@ -17,21 +25,21 @@ _marker setMarkerDirLocal (_data select 3);
// save properties on server machine for JIP, marker editing ready
if (isMultiplayer && {isServer}) then {
private ["_allMapMarkers", "_allMapMarkersProperties", "_index"];
private ["_allMapMarkers", "_allMapMarkersProperties", "_index"];
_allMapMarkers = GETMVAR(allMapMarkers,[]);
_allMapMarkersProperties = GETMVAR(allMapMarkersProperties,[]);
_allMapMarkers = GETMVAR(allMapMarkers,[]);
_allMapMarkersProperties = GETMVAR(allMapMarkersProperties,[]);
_index = _allMapMarkers find _marker;
_index = _allMapMarkers find _marker;
if (_index == -1) then {
_allMapMarkers pushBack _marker;
_allMapMarkersProperties pushBack _data;
} else {
_allMapMarkers set [_index, _marker];
_allMapMarkersProperties set [_index, _data];
};
if (_index == -1) then {
_allMapMarkers pushBack _marker;
_allMapMarkersProperties pushBack _data;
} else {
_allMapMarkers set [_index, _marker];
_allMapMarkersProperties set [_index, _data];
};
GVAR(allMapMarkers) = _allMapMarkers;
GVAR(allMapMarkersProperties) = _allMapMarkersProperties;
GVAR(allMapMarkers) = _allMapMarkers;
GVAR(allMapMarkersProperties) = _allMapMarkersProperties;
};