I can make my title more than 50 characters if I want github screw you

This commit is contained in:
eraser1 2016-07-09 20:38:15 -05:00
parent da3a785a45
commit 1766ed3040
8 changed files with 64 additions and 14 deletions

View File

@ -4,7 +4,7 @@ class CfgPatches
{
units[] = {};
weapons[] = {};
a3_DMS_version = "July 5, 2016 (Fixed)";
a3_DMS_version = "July 9, 2016";
requiredVersion = 1.36;
requiredAddons[] = {"exile_client","exile_server_config"};
};

View File

@ -130,23 +130,31 @@ DMS_SpawnMissions_Scheduled = false; // Whether or not to spawn missions in a sc
//should help with server performance drops when spawning a mission, as DMS_fnc_findSafePos is the most resource-intensive function.
DMS_AttemptsUntilThrottle = 15; // How many attempts until the parameters are throttled.
DMS_ThrottleCoefficient = 0.9; // How much the parameters are throttled. The parameters are multiplied by the coefficient, so 0.9 means 90% of whatever the parameter was.
DMS_MinThrottledDistance = 100; // The minimum distance to which it will throttle. If the throttled value is less than this, then this value is used instead.
DMS_MinThrottledDistance = 500; // The minimum distance to which it will throttle. If the throttled value is less than this value, then this value is used instead.
DMS_PlayerNearBlacklist = 2000; // Missions won't spawn in a position this many meters close to a player
DMS_SpawnZoneNearBlacklist = 2500; // Missions won't spawn in a position this many meters close to a spawn zone
DMS_TraderZoneNearBlacklist = 2500; // Missions won't spawn in a position this many meters close to a trader zone
DMS_MissionNearBlacklist = 2500; // Missions won't spawn in a position this many meters close to another mission
DMS_WaterNearBlacklist = 500; // Missions won't spawn in a position this many meters close to water
DMS_TerritoryNearBlacklist = 100; // Missions won't spawn in a position this many meters close to a territory flag. This is a resource intensive check, don't set this value too high!
DMS_MixerNearBlacklist = 1000; // Missions won't spawn in a position this many meters close to a concrete mixer
DMS_ContaminatedZoneNearBlacklist = 1000; // Missions won't spawn in a position this many meters close to a contaminated zone
DMS_MinSurfaceNormal = 0.9; // Missions won't spawn in a position where its surfaceNormal is less than this amount. The lower the value, the steeper the location. Greater values means flatter locations. Values can range from 0-1, with 0 being sideways, and 1 being perfectly flat. For reference: SurfaceNormal of about 0.7 is when you are forced to walk up a surface. If you want to convert surfaceNormal to degrees, use the arc-cosine of the surfaceNormal. 0.9 is about 25 degrees. Google "(arccos 0.9) in degrees"
DMS_MinDistFromWestBorder = 250; // Missions won't spawn in a position this many meters close to the western map border.
DMS_MinDistFromEastBorder = 250; // Missions won't spawn in a position this many meters close to the easter map border.
DMS_MinDistFromSouthBorder = 250; // Missions won't spawn in a position this many meters close to the southern map border.
DMS_MinDistFromNorthBorder = 250; // Missions won't spawn in a position this many meters close to the northern map border.
DMS_SpawnZoneMarkerTypes = [ // If you're using custom spawn zone markers, make sure you define them here. CASE SENSITIVE!!!
"ExileSpawnZone"
"ExileSpawnZoneIcon"
];
DMS_TraderZoneMarkerTypes = [ // If you're using custom trader markers, make sure you define them here. CASE SENSITIVE!!!
"ExileTraderZone"
"ExileTraderZoneIcon"
];
DMS_MixerMarkerTypes = [ // If you're using custom concrete mixer map markers, make sure you define them here. CASE SENSITIVE!!!
"ExileConcreteMixerZoneIcon"
];
DMS_ContaminatedZoneMarkerTypes = [ // If you're using custom contaminated zone markers, make sure you define them here. CASE SENSITIVE!!!
"ExileContaminatedZoneIcon"
];
/*Mission spawn location settings*/
@ -1023,6 +1031,7 @@ DMS_SpawnMissions_Scheduled = false; // Whether or not to spawn missions in a sc
#endif
"Exile_Melee_Axe",
"Exile_Melee_SledgeHammmer",
//"Exile_Melee_Shovel", // Not really interesting for players...
"arifle_Katiba_GL_F",
"arifle_MX_GL_Black_F",
"arifle_Mk20_GL_F",
@ -1090,7 +1099,6 @@ DMS_SpawnMissions_Scheduled = false; // Whether or not to spawn missions in a sc
"Exile_Item_Matches",
"Exile_Item_CookingPot",
"Exile_Melee_Axe",
"Exile_Item_Shovel",
"Exile_Item_CanOpener"
] + DMS_BoxFood + DMS_BoxDrinks + DMS_BoxMeds;
DMS_Box_BaseParts_Wood = [ // List of wooden base parts.

View File

@ -98,6 +98,11 @@ if !(DMS_ai_offload_to_client) then
DMS_ai_offloadOnUnfreeze = false;
};
if !(DMS_ai_allowFreezing) then
{
DMS_ai_freezeOnSpawn = false;
};
DMS_A3_AllMarkerColors = [];

View File

@ -85,7 +85,7 @@ for "_attempts" from 1 to MAX_ATTEMPTS do
_playerNearLimit = (DMS_ThrottleCoefficient * _playerNearLimit) max DMS_MinThrottledDistance;
// SurfaceNormal is a bit more tricky than distances, so it's throttled differently. To convert from degrees to surfaceNormal, you take the cosine of the degrees from horizontal. Take the arc-cosine to convert surfaceNormal to degrees: arccos(0.8) in degrees ~= 37
_minSurfaceNormal = (_minSurfaceNormal - 0.005) max 0.8;
_minSurfaceNormal = (_minSurfaceNormal - 0.005) max 0.75;
if (DMS_DEBUG) then
{
@ -93,7 +93,7 @@ for "_attempts" from 1 to MAX_ATTEMPTS do
};
};
_isValidSpot = [_pos, _waterNearLimit, _minSurfaceNormal, _spawnZoneNearLimit, _traderZoneNearLimit, _missionNearLimit, _playerNearLimit, _territoryNearLimit] call DMS_fnc_IsValidPosition;
_isValidSpot = [_pos, _waterNearLimit, _minSurfaceNormal, _spawnZoneNearLimit, _traderZoneNearLimit, _missionNearLimit, _playerNearLimit, _territoryNearLimit, DMS_MixerNearBlacklist, DMS_ContaminatedZoneNearBlacklist] call DMS_fnc_IsValidPosition;
if (_isValidSpot) exitWith
{

View File

@ -11,6 +11,9 @@
_traderZoneNearLimit, // NUMBER (distance): Minimum distance from a trader zone.
_missionNearLimit, // NUMBER (distance): Minimum distance from another mission.
_playerNearLimit, // NUMBER (distance): Minimum distance from a player.
_territoryNearLimit, // NUMBER (distance): Minimum distance from a territory.
_mixerNearLimit, // NUMBER (distance): Minimum distance from a concrete mixer.
_contaminatedZoneNearLimit // NUMBER (distance): Minimum distance from a contaminated zone.
] call DMS_fnc_IsValidPosition;
All parameters except "_pos" are optional.
@ -27,7 +30,9 @@ if !(params
"_traderZoneNearLimit",
"_missionNearLimit",
"_playerNearLimit",
"_territoryNearLimit"
"_territoryNearLimit",
"_mixerNearLimit",
"_contaminatedZoneNearLimit"
])
then
{
@ -78,17 +83,25 @@ else
} forEach (missionNamespace getVariable ["A3XAI_mapMarkerArray",[]]);
{
private _markerType = markertype _x;
// Check for nearby spawn points
if ((_spawnZoneNearLimit>0) && {((markertype _x) in DMS_SpawnZoneMarkerTypes) && {((getMarkerPos _x) distance2D _pos)<=_spawnZoneNearLimit}}) throw "a spawn zone";
if ((_markerType in DMS_SpawnZoneMarkerTypes) && {((getMarkerPos _x) distance2D _pos)<=_spawnZoneNearLimit}) throw "a spawn zone";
// Check for nearby trader zones
if ((_traderZoneNearLimit>0) && {((markertype _x) in DMS_TraderZoneMarkerTypes) && {((getMarkerPos _x) distance2D _pos)<=_traderZoneNearLimit}}) throw "a trader zone";
if ((_markerType in DMS_TraderZoneMarkerTypes) && {((getMarkerPos _x) distance2D _pos)<=_traderZoneNearLimit}) throw "a trader zone";
// Check for nearby concrete mixers
if ((_markerType in DMS_MixerMarkerTypes) && {((getMarkerPos _x) distance2D _pos)<=_mixerNearLimit}) throw "a concrete mixer";
// Check for nearby contaminated zones
if ((_markerType in DMS_ContaminatedZoneMarkerTypes) && {((getMarkerPos _x) distance2D _pos)<=_contaminatedZoneNearLimit}) throw "a contaminated zone";
// Check for nearby missions
if (_missionNearLimit>0) then
{
_missionPos = missionNamespace getVariable [format ["%1_pos",_x], []];
if (!(_missionPos isEqualTo []) && {(_missionPos distance2D _pos)<=_missionNearLimit}) throw "a mission";
if (!(_missionPos isEqualTo []) && {(_missionPos distance2D _pos)<=_missionNearLimit}) throw "a DMS mission";
if
(

View File

@ -138,8 +138,15 @@ if (!isNull _av) then
};
}
else
{
if (local _av) then
{
_av lock 1;
}
else
{
[_av, 1] remoteExecCall ["lock", _av];
};
if (DMS_DEBUG) then
{

View File

@ -46,9 +46,10 @@ if !(isClass (configFile >> "CfgVehicles" >> _vehicleClass)) exitWith
private _vehpos = [];
private _maxDistance = 5;
while {_vehpos isEqualTo []} do
for "_i" from 0 to 1000 do
{
_vehpos = _position findEmptyPosition [0,_maxDistance,_vehicleClass];
if !(_vehpos isEqualTo []) exitWith {};
_maxDistance = (_maxDistance + 5);
};

View File

@ -153,6 +153,22 @@ ___
### Main Branch
### July 5, 2016 (7:15 PM CST-America):
* **NEW CONFIG VALUES**
DMS_MixerNearBlacklist
DMS_ContaminatedZoneNearBlacklist
DMS_MixerMarkerTypes
DMS_ContaminatedZoneMarkerTypes
* Pastebin for new config values: http://pastebin.com/QeNWRXgv
* Increased "DMS_MinThrottledDistance" (from 100m to 500m).
* Removed the Shovel from crate loot.
* Edited "DMS_SpawnZoneMarkerTypes" and "DMS_TraderZoneMarkerTypes" to look for the corresponding "Icons" instead of the "circle" marker type, since some people like to remove the circle.
* You can now define a minimum distance from "Contaminated Zones" and "Concrete Mixers" for (dynamic) missions.
* "DMS_ai_freezeOnSpawn" will be set to false if "DMS_ai_allowFreezing" is disabled.
* Fixed an issue where a vehicle wouldn't unlock when the crew was killed (locality issues).
* Slight optimization(s) (thanks for the tip infiSTAR).
### July 5, 2016 (8:15 PM CST-America):
* Fixed a typo in the "SpawnAIGroup" functions from the previous update
### July 5, 2016 (7:15 PM CST-America):