diff --git a/@GMS/addons/custom_server/Compiles/Functions/GMS_UMS_fnc_findShoreLocation.sqf b/@GMS/addons/custom_server/Compiles/Functions/GMS_UMS_fnc_findShoreLocation.sqf index 07863cf..cf286ae 100644 --- a/@GMS/addons/custom_server/Compiles/Functions/GMS_UMS_fnc_findShoreLocation.sqf +++ b/@GMS/addons/custom_server/Compiles/Functions/GMS_UMS_fnc_findShoreLocation.sqf @@ -21,10 +21,11 @@ switch (toLower worldName) do case "taviana": {_mapCenter = [12000,12000,0];_maxDistance = 12000}; case "napf" : {_mapCenter = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition");_maxDistance = 12000}; case "lythium": {_mapCenter = [10000,10000,0]; _maxDistance = 6000;}; + case "vt7": {_mapCenter = [9000,9000,0]; _maxDistance = 9000}; default {_mapCenter = [6000,6000,0]; _maxDistance = 6000;}; }; -_evaluate = true; +private _evaluate = true; while {_evaluate} do { _waterPos = [ @@ -35,33 +36,14 @@ _evaluate = true; 2, // water mode [2 = water only] 25, // max gradient 0 // shoreMode [0 = anywhere] - ] call BIS_fnc_findSafePos; - /* - _priorUMSpositions = +blck_priorDynamicUMS_Missions; + ] call BIS_fnc_findSafePos; + + if (((getTerrainHeightASL _waterPos) < -4) && (getTerrainHeightASL _waterPos) > -10) then { - if (diag_tickTime > ((_x select 1) + 1800) then - { - blck_priorDynamicUMS_Missions = blck_priorDynamicUMS_Missions - _x; - } else { - if (_waterPos distance2D (_x select 0) < 2000) exitWith {_evaluate = false}; - }; - } forEach _priorUMSpositions; - */ - if (_evaluate) then - { - if (abs(getTerrainHeightASL _waterPos) < 30) then - { - if (abs(getTerrainHeightASL _waterPos) > 1) then - { - //_waterMarker = createMarker [format["water mission %1",getTerrainHeightASL _waterPos],_waterPos]; - //_waterMarker setMarkerColor "ColorRed"; - //_waterMarker setMarkerType "mil_triangle"; - //_waterMarker setMarkerText format["Depth %1",getTerrainHeightASL _waterPos]; - _evaluate = false; - }; - }; + _evaluate = false; }; }; +//diag_log format["_findShoreLocation: _waterPos = %1",_waterPos]; _waterPos diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf index 265c65c..cab3ef4 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnEmplacedWeaponArray.sqf @@ -27,14 +27,15 @@ _units = []; _abort = false; _pos = []; -// Define _missionEmplacedWeapons if not already configured. -if (_missionEmplacedWeapons isEqualTo []) then +private _emplacedWepData = +_missionEmplacedWeapons; +// Define _emplacedWepData if not already configured. +if (_emplacedWepData isEqualTo []) then { _missionEmplacedWeaponPositions = [_coords,_noEmplacedWeapons,35,50] call blck_fnc_findPositionsAlongARadius; { _static = selectRandom blck_staticWeapons; - _missionEmplacedWeapons pushback [_static,_x]; + _emplacedWepData pushback [_static,_x]; } forEach _missionEmplacedWeaponPositions; _useRelativePos = false; }; @@ -77,7 +78,7 @@ if (_missionEmplacedWeapons isEqualTo []) then _return = grpNull; ["createGroup returned grpNull","warning"] call blck_fnc_log; }; -} forEach _missionEmplacedWeapons; +} forEach _emplacedWepData; if !(_abort) then { blck_monitoredVehicles append _emplacedWeps; diff --git a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf index dc2d07a..7f8820b 100644 --- a/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf +++ b/@GMS/addons/custom_server/Compiles/Missions/GMS_fnc_spawnMissionVehiclePatrols.sqf @@ -22,22 +22,22 @@ if (_backpacks isEqualTo []) then {_backpacks = [_skillAI] call blck_fnc_sele if (_weaponList isEqualTo []) then {_weaponList = [_skillAI] call blck_fnc_selectAILoadout}; if (_sideArms isEqualTo []) then {[_skillAI] call blck_fnc_selectAISidearms}; +private["_vehGroup","_vehiclePatrolSpawns""_missiongroups","_vehiclePatrolSpawns","_vehicle","_spawnPos","_return"]; +private _vehicles = []; +private _missionAI = []; +private _abort = false; +private _patrolsThisMission = +_missionPatrolVehicles; - -private["_vehGroup","_vehiclePatrolSpawns","_missionAI","_missiongroups","_vehicles","_return","_vehiclePatrolSpawns","_vehicle","_return","_abort","_spawnPos","_v"]; -_vehicles = []; -_missionAI = []; -_abort = false; - -if (_missionPatrolVehicles isEqualTo []) then +if (_patrolsThisMission isEqualTo []) then { _useRelativePos = false; _vehiclePatrolSpawns = [_coords,_noVehiclePatrols,45,60] call blck_fnc_findPositionsAlongARadius; { - _v = [_skillAI] call blck_fnc_selectPatrolVehicle; - _missionPatrolVehicles pushBack [_v, _x]; + private _v = [_skillAI] call blck_fnc_selectPatrolVehicle; + _patrolsThisMission pushBack [_v, _x]; }forEach _vehiclePatrolSpawns; }; + #define configureWaypoints false { if (_useRelativePos) then @@ -46,7 +46,7 @@ if (_missionPatrolVehicles isEqualTo []) then } else { _spawnPos = _x select 1; }; - _vehicle = _x select 0; + private _vehicle = _x select 0; _vehGroup = [blck_AI_Side,true] call blck_fnc_createGroup; _patrolVehicle = objNull; @@ -67,7 +67,8 @@ if (_missionPatrolVehicles isEqualTo []) then } else { _abort = true; }; -} forEach _missionPatrolVehicles; +} forEach _patrolsThisMission; + if !(_abort) then { blck_monitoredVehicles append _vehicles; diff --git a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf index 4aabac8..2390f85 100644 --- a/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf +++ b/@GMS/addons/custom_server/Compiles/Units/GMS_fnc_spawnUnit.sqf @@ -12,7 +12,7 @@ */ #include "\q\addons\custom_server\Configs\blck_defines.hpp"; -private ["_i","_weap","_skin","_unit","_skillLevel","_aiSkills","_launcherRound","_index","_ammoChoices","_optics","_pointers","_muzzles","_underbarrel","_legalOptics"]; +private ["_i","_weap","_unit","_skillLevel","_aiSkills","_launcherRound","_index","_ammoChoices","_optics","_pointers","_muzzles","_underbarrel","_legalOptics"]; params["_pos","_aiGroup",["_skillLevel","red"],["_uniforms", []],["_headGear",[]],["_vests",[]],["_backpacks",[]],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]],["_scuba",false],["_garrison",false]]; if (_weaponList isEqualTo []) then {_weaponList = [_skillLevel] call blck_fnc_selectAILoadout}; @@ -60,17 +60,6 @@ if (_scuba) then _unit swiminDepth (([_pos] call blck_fnc_findWaterDepth) / 2); }; -_skin = ""; -_counter = 1; - -if (surfaceIsWater (getPos _unit)) then -{ - _uniforms = blck_UMS_uniforms; - _headGear = blck_UMS_headgear; - _weaponList = blck_UMS_weapons; - _vests = blck_UMS_vests; -}; - //Sets AI Tactics _unit enableAI "ALL"; if(_garrison) then @@ -81,6 +70,14 @@ _unit allowDammage true; _unit setBehaviour "COMBAT"; _unit setunitpos "AUTO"; +if (surfaceIsWater (getPos _unit)) then +{ + _uniforms = blck_UMS_uniforms; + _headGear = blck_UMS_headgear; + _weaponList = blck_UMS_weapons; + _vests = blck_UMS_vests; +}; +_unit forceAddUniform (selectRandom _uniforms); if !(_headGear isEqualTo []) then { _unit addHeadgear (selectRandom _headGear); diff --git a/@GMS/addons/custom_server/Compiles/blck_variables.sqf b/@GMS/addons/custom_server/Compiles/blck_variables.sqf index e470a8e..1846230 100644 --- a/@GMS/addons/custom_server/Compiles/blck_variables.sqf +++ b/@GMS/addons/custom_server/Compiles/blck_variables.sqf @@ -52,7 +52,7 @@ blck_missionData = []; blck_activeMissionsList = []; blck_initializedMissionsList = []; blck_blackListedLocations = []; // [ [marker, time]] - +blck_activeMonitorThreads = 0; blck_validEndStates = ["allUnitsKilled", "playerNear", "allKilledOrPlayerNear","assetSecured"]; blck_validLootSpawnTimings = ["atMissionSpawnGround","atMissionSpawnAir","atMissionEndGround","atMissionEndAir"]; blck_validLootLoadTimings = ["atMissionCompletion", "atMissionSpawn"];