Build 135

More minor fixes, a few variables renamed to remove reference to DBD Clan
This commit is contained in:
Ghostrider-GRG- 2018-06-03 09:47:47 -04:00
parent 0f50530d30
commit a9e9f52132
20 changed files with 22 additions and 236 deletions

View File

@ -1,7 +1,6 @@
////////////////////////////////////////////
// Delete and change Mission Markers
// 7/10/15
// by Ghostrider-DbD-
// by Ghostrider-GFG-
//////////////////////////////////////////
// delete a marker

View File

@ -1,7 +1,7 @@
/*
Remove all inventory from an object.
By Ghostrider-DbD0
By Ghostrider-GRG-
--------------------------
License
--------------------------

View File

@ -1,210 +0,0 @@
/*
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";
/*
Tasks
1. avoid water (weight 100%, min distance 50 meters).
2. avoid sites of active heli, UMS or land dynamic missions. (weight sliding down to 50%, min distance 1000 meters).
3. avoid players and player bases (weight 100%, 1000 meters min distance).
4. avoid cites and towns (weight 20%, min distance according to settings).
*/
private["_findNew","_tries","_coords","_dist","_xpos","_ypos","_newPos","_townPos","_pole","_oldPos","_ignore"];
_fnc_getNewPosition = {
//[_centerForSearch,_minDistFromCenter,_maxDistanceFromCenter,_minDistanceFromNearestObj,_waterMode,_maxTerainGradient,_shoreMode] call BIS_fnc_findSafePos
// https://community.bistudio.com/wiki/BIS_fnc_findSafePos
_coords = [blck_mapCenter,0,blck_mapRange,30,0,5,0] call BIS_fnc_findSafePos;
//diag_log format["<<--->> _coords = %1",_coords];
_coords
};
_fnc_excludeBlacklistedLocations = {
private _coords = _this select 0;
private _findNew = false;
{
if ( ((_x select 0) distance2D _coords) < (_x select 1)) exitWith
{
_findNew = true;
};
} forEach blck_locationBlackList;
_findNew
};
_fnc_excludeNearbyMissions = {
private _coords = _this select 0;
private _findNew = false;
{
if ((_x distance2D _coords) < blck_MinDistanceFromMission) then {
_findNew = true;
};
}forEach DBD_HeliCrashSites;
//diag_log format["#- findSafePosn -# blck_ActiveMissionCoords isEqualTo %1", blck_ActiveMissionCoords];
{
//diag_log format["#- findSafePosn -# blck_ActiveMissionCoords active mission item is %1", _x];
if ( (_x distance2D _coords) < blck_MinDistanceFromMission) exitWith
{
_FindNew = true;
};
} forEach blck_ActiveMissionCoords;
_findNew
};
_fnc_excludeRecentMissionCoords = {
private _coords = _this select 0;
private _findNew = false;
{
_ignore = false;
//diag_log format["-# findSafePosn.sqf -# Old Mission element is %1", _x];
if (diag_tickTime > ((_x select 1) + 1200)) then // if the prior mission was completed more than 20 min ago then delete it from the list and ignore the check for this location.
{
_ignore = true;
blck_recentMissionCoords= blck_recentMissionCoords - _x;
//diag_log format["-# findSafePosn.sqf -# Removing Old Mission element: %1", _x];
};
if !(_ignore) then
{
//diag_log format["-# findSafePosn.sqf -# testing _coords against Old Mission coords is %1", _x select 0];
if ( ((_x select 0) distance2D _coords) < blck_MinDistanceFromMission) then
{
_findNew = true;
//diag_log format["-# findSafePosn.sqf -# Too Close to Old Mission element: %1", _x];
};
};
} forEach blck_recentMissionCoords;
_findNew
};
_fnc_excludeSitesAtShore = {
private _coords = _this select 0;
private _findNew = false;
// test for water nearby
_dist = 50;
for [{_i=0}, {_i<360}, {_i=_i+20}] do
{
_xpos = (_coords select 0) + sin (_i) * _dist;
_ypos = (_coords select 1) + cos (_i) * _dist;
_newPos = [_xpos,_ypos,0];
if (surfaceIsWater _newPos) then
{
_findNew = true;
_i = 361;
};
};
_findNew
};
_fnc_excludeCitiesAndTowns = {
private _coords = _this select 0;
private _findNew = false;
// check that missions spawn at least 1 kkm from towns
{
_townPos = [((locationPosition _x) select 0), ((locationPosition _x) select 1), 0];
if (_townPos distance2D _coords < blck_minDistanceFromTowns) exitWith {
_findNew = true;
};
} forEach blck_townLocations;
_findNew
};
_fnc_excludeSpawnsNearPlayers = {
private _coords = _this select 0;
private _findNew = false;
// check to be sure we do not spawn a mission on top of a player.
{
if (isPlayer _x && (_x distance2D _coords) < blck_minDistanceToPlayer) then
{
_findNew = true;
};
}forEach playableUnits;
_findNew
};
_fnc_mapSpecificExclusions = {
private _coords = _this select 0;
private _findNew = false;
if (toLower(worldName) in ["taviana","napf"]) then
{
_tavTest = createVehicle ["SmokeShell",_coords,[], 0, "CAN_COLLIDE"];
_tavHeight = (getPosASL _tavTest) select 2;
deleteVehicle _tavTest;
if (_tavHeight > 100) then {_FindNew = true;};
};
_findNew
};
_fnc_excludeSitesNearBases = {
private _coords = _this select 0;
private _findNew = false;
// check for nearby plot pole/freq jammer within 800 meters
_mod = call blck_fnc_getModType;
_pole = "";
if (_mod isEqualTo "Epoch") then {_pole = "PlotPole_EPOCH"};
if (_mod isEqualTo "Exile") then {_pole = "Exile_Construction_Flag_Static"};
//diag_log format["_fnc_findSafePosn:: -- >> _mod = %1 and _pole = %2",_mod,_pole];
{
if ((_x distance2D _coords) < blck_minDistanceToBases) then
{
_findNew = true;
};
}forEach nearestObjects[blck_mapCenter, [_pole], blck_minDistanceToBases];
_findNew
};
private _findNew = true;
private _tries = 0;
while {_findNew} do {
_findNew = false;
_coords = call _fnc_getNewPosition;
_findNew = [_coords] call _fnc_mapSpecificExclusions;
if !(_findNew) then
{
_findNew [_coords] call _fnc_excludeSitesAtShore;
};
if !(_findNew) then
{
_findNew = [_coords] call _fnc_excludeBlacklistedLocations;
};
if !(_findNew) then
{
_findNew = [_coords] call _fnc_excludeNearbyMissions;
};
if !(_findNew) then
{
_findNew = [_coords] call _fnc_excludeSpawnsNearPlayers;
};
if !(_findNew) then
{
_findNew = [_coords] call _fnc_excludeSitesNearBases;
};
if !(_findNew) then
{
};
if !(_findNew) then
{
};
_tries = _tries + 1;
};
if ((count _coords) > 2) then
{
private["_temp"];
_temp = [_coords select 0, _coords select 1];
_coords = _temp;
};
_coords;

View File

@ -30,7 +30,7 @@ while {_findNew} do {
if ((_x distance2D _coords) < blck_MinDistanceFromMission) then {
_findNew = true;
};
}forEach DBD_HeliCrashSites;
}forEach blck_heliCrashSites;
{
if ( ((_x select 0) distance2D _coords) < (_x select 1)) exitWith

View File

@ -1,7 +1,7 @@
////////////////////////////////////////////
// Create, delete and change Mission Markers
// 7/10/15
// by Ghostrider-DbD-
// by Ghostrider-GRG-
//////////////////////////////////////////
// spawn a temporary marker to indicate the position of a 'completed' mission
// this will not show to JIP players

View File

@ -5,7 +5,7 @@
If not it directs them to the next waypoint.
It uses a timestamp attached to the group that is cleared upon waypoint completion.
By Ghostrider-DbD-
By Ghostrider-GRG-
Last modified 3/14/17
--------------------------

View File

@ -1,6 +1,6 @@
/*
GMS_fnc_time.sqf
by Ghostrider-DBD_
by Ghostrider-GRG-
Credits to AWOL, A3W, LouD and Creampie for insights.

View File

@ -1,8 +1,7 @@
/*
Killed handler for _units
By Ghostrider-DbD
Last Modified 4-11-17
By Ghostrider-GRG-
--------------------------
License

View File

@ -1,7 +1,7 @@
/*
Delete Dead AI and nearby weapons after an appropriate period.
by Ghostrider
Last updated 1/24/17
by Ghostrider-GRG-
--------------------------
License
--------------------------

View File

@ -1,8 +1,7 @@
/*
Killed handler for _units
By Ghostrider-DbD
Last Modified 4-11-17
By Ghostrider-GRG-
--------------------------
License

View File

@ -1,8 +1,7 @@
/*
Killed handler for _units
By Ghostrider-DbD
Last Modified 4-11-17
By Ghostrider-GRG-
--------------------------
License

View File

@ -42,8 +42,8 @@ blck_HC_monitoredGroups = [];
"Group" setDynamicSimulationDistance 1800;
enableDynamicSimulationSystem true;
#endif
// Arrays for use during cleanup of alive AI at some time after the end of a mission
DBD_HeliCrashSites = [];
blck_heliCrashSites = [];
// radius within whih missions are triggered. The trigger causes the crate and AI to spawn.
blck_TriggerDistance = 1000;

View File

@ -1,5 +1,5 @@
// Small bandit base on the salt flats
// by Ghostrider-Dbd-
// by Ghostrider-GRG-
// 11/8/16
private _objects = [

View File

@ -1,5 +1,5 @@
// Small bandit base on the salt flats
// by Ghostrider-Dbd-
// by Ghostrider-GRG-
// 11/8/16
private _objects = [

View File

@ -46,7 +46,7 @@ if (_missionEmplacedWeapons isEqualTo []) then
_wep = [_wepnClassName,[0,0,0],false] call blck_fnc_spawnVehicle;
_empGroup setVariable["groupVehicle",_wep];
_wep setVariable["vehicleGroup",_empGroup];
_wep setVariable["DBD_vehType","emplaced"];
_wep setVariable["GRG_vehType","emplaced"];
_wep setPosATL _pos;
[_wep,false] call blck_fnc_configureMissionVehicle;
_units = units _empGroup;

View File

@ -46,7 +46,7 @@ if (_missionEmplacedWeapons isEqualTo []) then
_wep = [_wepnClassName,[0,0,0],false] call blck_fnc_spawnVehicle;
_empGroup setVariable["groupVehicle",_wep];
_wep setVariable["vehicleGroup",_empGroup];
_wep setVariable["DBD_vehType","emplaced"];
_wep setVariable["GRG_vehType","emplaced"];
_wep setPosATL _pos;
[_wep,false] call blck_fnc_configureMissionVehicle;
_units = units _empGroup;

View File

@ -39,4 +39,4 @@ blck_fnc_sm_spawnObjects = compileFinal preprocessFileLineNumbers "\q\addons\cu
//diag_log "[blckeagls] GMS_sm_init_functions.sqf <Loaded>";
blck_sm_functionsLoaded = true;
blck_sm_functionsLoaded = true;

View File

@ -96,7 +96,7 @@ _fn_setupCrates = {
_blck_localMissionMarker = [format["SLS%1%2",_location select 0, _location select 1],(getPos _crate),"","","ColorGreen",["mil_box",[]]];
diag_log format["[blckeagls] SLS:: spawning diagnostic marker at %1",getPos _crate];
// params["_missionType","_markerPos","_markerLabel","_markerLabelType","_markerColor","_markerType"];
[_blck_localMissionMarker] execVM "debug\spawnMarker.sqf";
[_blck_localMissionMarker] call blck_fnc_spawnMarker;
};
#endif
_crate

View File

@ -47,7 +47,7 @@ blck_configsLoaded = nil;
call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Configs\blck_custom_config.sqf";
#ifdef GRGserver
diag_log "[blckegls] Running DBD Clan Version";
diag_log "[blckegls] Running Ghostridergaming Version";
#endif
#ifdef useDynamicSimulation
diag_log "[blckegls] dynamic simulation manager enabled";

View File

@ -1,6 +1,6 @@
private ["_version","_versionDate"];
blck_version = "6.82 Build 134";
blck_version = "6.82 Build 135";
_blck_version = blck_version;
_blck_versionDate = "6-3-18 4:00 PM";
_blck_versionDate = "6-3-18 10:00 AM";
blck_pvs_version = _blck_version;
publicVariable blck_pvs_version;