diff --git a/@ExileServer/addons/a3_dms/scripts/fn_CreateMarker.sqf b/@ExileServer/addons/a3_dms/scripts/fn_CreateMarker.sqf index da19aa1..bea5fa1 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_CreateMarker.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_CreateMarker.sqf @@ -65,6 +65,8 @@ _dot setMarkerColor "ColorBlack"; _dot setMarkerType "mil_dot"; _dot setMarkerText _text; +missionNamespace setVariable [format ["%1_pos",_dot], _pos]; + if (_randomMarker) then { _dir = random 360; diff --git a/@ExileServer/addons/a3_dms/scripts/fn_FindSafePos.sqf b/@ExileServer/addons/a3_dms/scripts/fn_FindSafePos.sqf index 79cef08..4d9c54b 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_FindSafePos.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_FindSafePos.sqf @@ -10,7 +10,7 @@ */ -private ["_nearestObjectMinDistance","_maxTerrainGradient","_safePosParams","_validspot","_i","_pos"]; +private ["_nearestObjectMinDistance","_maxTerrainGradient","_safePosParams","_validspot","_i","_pos","_missionPos"]; params [ @@ -71,9 +71,15 @@ while{!_validspot} do }; // Check for nearby missions - if ((DMS_MissionNearBlacklist>0) && {((_x find "DMS_MissionMarkerDot")>-1) && {((getMarkerPos _x) distance2D _pos)<=DMS_MissionNearBlacklist}}) then + if (DMS_MissionNearBlacklist>0) then { - throw ("another mission"); + _missionPos = missionNamespace getVariable [format ["%1_pos",_x], []]; + + diag_log format["Marker %1 has _missionPos: %2",_x,_missionPos]; + if (!(_missionPos isEqualTo []) && {(_missionPos distance2D _pos)<=DMS_MissionNearBlacklist}) then + { + throw ("another mission"); + }; }; } forEach allMapMarkers; diff --git a/Pre-Packed PBO/a3_dms.pbo b/Pre-Packed PBO/a3_dms.pbo index b9cb599..22364f5 100644 Binary files a/Pre-Packed PBO/a3_dms.pbo and b/Pre-Packed PBO/a3_dms.pbo differ diff --git a/README.md b/README.md index 2550b5c..0304d33 100644 --- a/README.md +++ b/README.md @@ -52,12 +52,18 @@ if (!hasInterface && !isServer) then ## Changelog: +#### September 25, 2015 (11:30 PM CST-America): +* Improved DMS_fnc_FindSafePos when checking for nearby missions - it should now use the proper mission location (if it was given correctly in the parameters for DMS_fnc_CreateMarker) instead of the marker position, which could be offset. Thanks to [Rod Serling](https://github.com/Rod-Serling) for complaining about this "issue" :P + + #### September 25, 2015 (7:30 PM CST-America): * NEW CONFIG VALUES: DMS_SpawnMineWarningSigns DMS_BulletProofMines * You can now manually define the rare loot chance per crate. * You can now define the mine amount and radius directly from the call for DMS_fnc_SpawnMinefield. +* You can now define the classname of the mine to be spawned in the minefield. +* Mines can now be configured to be bulletproof (AT mines by default will explode when shot). #### September 25, 2015 (1:30 AM CST-America):