From cec27d7d358761054721c043726e9c24d77ddb68 Mon Sep 17 00:00:00 2001 From: eraser1 Date: Fri, 25 Sep 2015 23:19:00 -0500 Subject: [PATCH] Logic improvement, forgot a couple things in readme * 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 Forgot a couple things for the previous patch notes --- .../addons/a3_dms/scripts/fn_CreateMarker.sqf | 2 ++ .../addons/a3_dms/scripts/fn_FindSafePos.sqf | 12 +++++++++--- Pre-Packed PBO/a3_dms.pbo | Bin 209575 -> 209809 bytes README.md | 6 ++++++ 4 files changed, 17 insertions(+), 3 deletions(-) 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 b9cb599c9df98441fc39af834f3a3d19e69ef6df..22364f5a9078a970c58214cc45e34de9eaaa1072 100644 GIT binary patch delta 353 zcmZ4flxN~|o((;0yuF+ZU=Sw87S=m?CYwL+c3z0cH*vPG?ag1=+P|_fZvV>0^xRM= zH?z1nGe6HSF*miiATc>rp?I1sv#5xwVSGV;v64=FN`6VKjsl1iyZyQa(;5kG9i@1v zrhx4YflL~l(^p0@$xPqu#w5rIlgOWb|0I)!m_oD?+@K1eG10NH*1TNP7wR#K)<-M( zCKhF<7AdG2Dr6)UE5HrSFSb%pH3C{)p@Sp_(#Qz}nQ00diW*1~3Yo>Og{6r(A^AY# zH5Js<6sl3AQ!ABr<)WIFN9OW|C*(tew7KDU;;( fvS=pR>mtJ0?MF9rh1lD>h8LKf_su&R)vf>l;^uQ8 delta 188 zcmbREoM-t{o((;0yuO?aU{L>tCCqp7Og4XBUS5dEX}kZSyv<+P+P|_fZvV>0^xSZ} zj3v`@iR~8ynN&GlHC%jy<9#!Wi!<}{{8AH(oN^MAvvV?wOY96Z71Y!esx>s?D-_Z) z^HLO)kd*o+7GH0BDV$;7(W)j#Q8^fe< bU1a~q6)LimJ^#*#S{FN^WIAVkOZ#B}U==|R 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):