mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
cb52ac18c9
Upstream fix from AGM If CfgMarkers don't match, will throw warning: 22:46:53 [3896,74.535,0,"z\ace\addons\markers\functions\fnc_setMarkerNetwork.sqf:11","WARNING: CfgMarker not found changed to milDot"]
47 lines
1.4 KiB
Plaintext
47 lines
1.4 KiB
Plaintext
// by commy2
|
|
#include "script_component.hpp"
|
|
|
|
if (_this select 1 == 1) then {
|
|
disableserialization;
|
|
_display = _this select 0;
|
|
|
|
_pos = ctrlPosition (_display displayCtrl 102);
|
|
_pos = [
|
|
(_pos select 0) + (_pos select 2) / 2,
|
|
(_pos select 1) + (_pos select 3) / 2
|
|
];
|
|
|
|
switch (true) do {
|
|
case (!isNull findDisplay 12): {
|
|
_pos = (findDisplay 12 displayCtrl 51) ctrlMapScreenToWorld _pos;
|
|
};
|
|
case (!isNull findDisplay 37): {
|
|
_pos = (findDisplay 37 displayCtrl 51) ctrlMapScreenToWorld _pos;
|
|
};
|
|
case (!isNull findDisplay 52): {
|
|
_pos = (findDisplay 52 displayCtrl 51) ctrlMapScreenToWorld _pos;
|
|
};
|
|
case (!isNull findDisplay 53): {
|
|
_pos = (findDisplay 53 displayCtrl 51) ctrlMapScreenToWorld _pos;
|
|
};
|
|
};
|
|
|
|
// set and send marker data the next frame. the actual marker isn't created yet
|
|
[
|
|
{
|
|
|
|
[QGVAR(setMarkerNetwork), [
|
|
allMapMarkers select (count allMapMarkers - 1), [
|
|
GETGVAR(currentMarkerConfigName,""),
|
|
GETGVAR(currentMarkerColorConfigName,""),
|
|
_this,
|
|
GETGVAR(currentMarkerAngle,0)
|
|
]
|
|
]] call EFUNC(common,globalEvent);
|
|
|
|
},
|
|
_pos
|
|
] call EFUNC(common,execNextFrame);
|
|
|
|
};
|