Added a function to generte a list of DMS markers and avoid spawning blck missions nearby

This commit is contained in:
Chris Cardozo
2020-05-09 14:22:20 -04:00
parent 34e2ea6b9f
commit 22152b7970
5 changed files with 41 additions and 7 deletions

View File

@ -51,6 +51,12 @@ _fn_buildBlacklistedLocationsList = {
//diag_log format["_fnc_findSafePosn: adding player %1 at %2",_x, getPosATL _x];
_blacklistedLocations pushBack [getPosATL _x,_minToPlayers];
} forEach allPlayers;
if !(blck_minDistanceFromDMS == -1) then
{
_blacklistedLocations append [] call blck_fnc_getAllDMSMarkers;
};
_blacklistedLocations
};

View File

@ -0,0 +1,25 @@
/*
By Ghostrider [GRG]
Copyright 2016
--------------------------
License
--------------------------
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
#define DMS_missionMarkerRootName "DMS_MissionMarker"
_fn_isDMSMarker = {
private _m = _this;
private _r = if ( ([_m,0,(count DMS_missionMarkerRootName) - 1] call BIS_fnc_trimString) isEqualTo DMS_missionMarkerRootName) then {true} else {false};
_r
};
private _m = [];
{
if (_x call _fn_isDMSMarker) then {_m pushBack _x};
} forEach allMapMarkers;
diag_log format["_fnc_getAllDMSMarkers: _bem = %1",_m];
_m

View File

@ -47,6 +47,7 @@ private _functions = [
["blck_fnc_findRandomLocationWithinCircle","\q\addons\custom_server\Compiles\Functions\GMS_fnc_findRandomLocationWithinCircle.sqf"],
["blck_fnc_getAllBlackeaglsMarkers" ,"\q\addons\custom_server\Compiles\Functions\GMS_fnc_getAllBlckeaglsMarkers.sqf"],
["blck_fnc_isBlackeaglsMarker","\q\addons\custom_server\Compiles\Functions\GMS_fnc_isBlackeaglsMarker.sqf"],
["blck_fnc_getAllDMSMarkers","\q\addons\custom_server\Compiles\Functions\GMS_fnc_getAllDMSMarkers.sqf"]
// Player-related functions
["GMS_fnc_handlePlayerUpdates","\q\addons\custom_server\Compiles\Units\GMS_fnc_handlePlayerUpdates.sqf"],

View File

@ -100,10 +100,11 @@
blck_showCountAliveAI = true;
//Minimum distance between missions
blck_MinDistanceFromMission = 1500;
blck_minDistanceToBases = 900;
blck_minDistanceToPlayer = 900;
blck_minDistanceFromTowns = 300;
blck_MinDistanceFromMission = 1000;
blck_minDistanceToBases = 1000;
blck_minDistanceToPlayer = 800;
blck_minDistanceFromTowns = 500;
blck_minDistanceFromDMS = 500; // minimum distance for a blackeagls mission from any nearby DMS missions. set to -1 to disable this check.
///////////////////////////////
// Mission Smoke and Signals

View File

@ -77,9 +77,10 @@
//Minimum distance between missions
blck_MinDistanceFromMission = 1000;
blck_minDistanceToBases = 400;
blck_minDistanceToPlayer = 500;
blck_minDistanceFromTowns = 250;
blck_minDistanceToBases = 1000;
blck_minDistanceToPlayer = 800;
blck_minDistanceFromTowns = 500;
blck_minDistanceFromDMS = 500; // minimum distance for a blackeagls mission from any nearby DMS missions. set to -1 to disable this check.
///////////////////////////////
// Mission Smoke and Signals